<!--//
function loadImage() { 
	var rollover = new Array();
	for (var i=0; i < 22 ; i++) {
		rollover[i] = new Image();
	}
}

function close_win(){
var nvua = navigator.userAgent;
if(nvua.indexOf('MSIE') >= 0){
if(nvua.indexOf('MSIE 5.0') == -1) {
top.opener = '';
}
}
else if(nvua.indexOf('Gecko') >= 0){
top.name = 'CLOSE_WINDOW';
wid = window.open('','CLOSE_WINDOW');
}
top.close();
}

function _JumpURLnewWin(url,sizeX,sizeY) 
{
  if (url != ''){
    win=window.open(url,"a","scrollbars=1,resizable=yes,width=" + sizeX + ",height=" + sizeY);
	
	scrXr = screen.width;
	scrYr = screen.height;
	win.moveTo( scrXr*0.16, scrYr*0.16 );
	win.focus()
  }
}
function _TargetWinOpen(url,sizeX,sizeY,target) 
{
  if (url != ''){
    win=window.open(url,target,"scrollbars=1,resizable=yes,width=" + sizeX + ",height=" + sizeY);
  }
}
function SelectJumpURL(obj) 
{
  url = obj.options[obj.selectedIndex].value;
  if (url != '')
  {
    window.location = url;
  }
}

function NewWinDetail(url) 
{
	window.open(url, 'photodetail', 'width=500, height=500, menubar=no, toolbar=no, scrollbars=no, location=no, status=no, resizable=no')
}

//-->


function changecolor(open_ck)
{
	var gd_pno = document.getElementById('gd_pno').value;
	var gd_color = document.getElementById('gd_color').value;
	var gd_size = document.getElementById('gd_size').value;
	var url = 'http://pj28.cyberstar.co.jp/goods/getstock/';
	var pars = 'gd_color=' + gd_color + '&gd_size=' + gd_size + '&gd_pno=' + gd_pno + '&open_ck=' + open_ck;
	
	var myAjax = new Ajax.Request(
		url, 
		{
			method: 'post', 
			parameters: pars, 
			onSuccess:function(httpObj){
				if(httpObj.responseText != ''){
					$("order").innerHTML = httpObj.responseText;
				}
			},
			onFailure:function(httpObj){
				$("order").innerHTML = "エラーで読み込めませんでした";
			}
		});
	
}

//ポップアップ展開
function subWindowOpen(html, winname, w, h){
  var x = 2;
  var y = 2;

  subwin = window.open(html,winname,'resizable=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,width='+w+',height='+h+',screenX='+x+',screenY='+y+',left='+x+',top='+y);
  subwin.focus();
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function changeImg(iName,img){
	document.images[iName].src=img;
}


function clip(oid){

// 	if (confirm("この求人情報を検討中フォルダに追加します。")) {
		
// 		new Autocompleter.Base.startIndicator();
		
		$('detailJobData'+oid).className = 'detailJobData_of'; 
		
		new Ajax.Request("/pharmacist/search/ajax_clip.php", {
		
			method: "get",

	 		parameters: "clipoid="+oid,

			onSuccess:function(httpObj){

				if(httpObj.responseText != ''){
					$('cliparea').innerHTML = httpObj.responseText;
				}

			},

			onFailure:function(httpObj){

				$("cliparea").innerHTML = "エラーで読み込めませんでした";

			}
		});
		
		//scroll読み込み
		new Ajax.Request("/pharmacist/search/ajax_clip.php", {
		
			method: "get",

	 		parameters: "clipoid="+oid+"&display=no",

			onSuccess:function(httpObj){

				if(httpObj.responseText != ''){
					$('cliparea_scroll').innerHTML = httpObj.responseText;
				}

			},

			onFailure:function(httpObj){

				$("cliparea").innerHTML = "エラーで読み込めませんでした";

			}
		});

// 	}
}

function clipdel(oid){

	if (confirm("この求人情報を検討中フォルダから削除します。")) {
		
// 		new Autocompleter.Base.startIndicator();
		
		new Ajax.Request("/pharmacist/search/ajax_clipdel.php", {
		
			method: "get",

	 		parameters: "clipoid="+oid,

			onSuccess:function(httpObj){

				if(httpObj.responseText != ''){
					$('cliparea').innerHTML = httpObj.responseText;

					$('detailJobData'+oid).className = 'detailJobData'; 
				}

			},

			onFailure:function(httpObj){

				$("cliparea").innerHTML = "エラーで読み込めませんでした";

			}
		});

		//scroll読み込み
		new Ajax.Request("/pharmacist/search/ajax_clipdel.php", {
		
			method: "get",

	 		parameters: "clipoid="+oid+"&display=no",

			onSuccess:function(httpObj){

				if(httpObj.responseText != ''){
					$('cliparea_scroll').innerHTML = httpObj.responseText;
					$('detailJobData'+oid).className = 'detailJobData'; 
				}

			},

			onFailure:function(httpObj){

				$("cliparea").innerHTML = "エラーで読み込めませんでした";

			}
		});
		
	}
}

function entryclipdel(oid){

	if (confirm("この求人情報を検討中フォルダから削除します。")) {
		
// 		new Autocompleter.Base.startIndicator();
		
		new Ajax.Request("/pharmacist/entry/ajax_clipdel.php", {
		
			method: "get",

	 		parameters: "clipoid="+oid,

			onSuccess:function(httpObj){

				if(httpObj.responseText != ''){
					$('cliplistBox').innerHTML = httpObj.responseText;

// 					$('detailJobData'+oid).className = 'detailJobData'; 
				}

			},

			onFailure:function(httpObj){

				$("cliparea").innerHTML = "エラーで読み込めませんでした";

			}
		});

	}
}


function JobSearchEmploy(val){

// 	obj = document.jobsearch.employment_id;
// 	index = obj.selectedIndex;
// 	val = obj.options[index].value;
	
	new Ajax.Request("/pharmacist/search/ajax_jobsearchemploy.php", {
	
		method: "get",

 		parameters: "value="+val,

		onSuccess:function(httpObj){

			if(httpObj.responseText != ''){
				$('salary_list').innerHTML = httpObj.responseText;
			}

		},

		onFailure:function(httpObj){

			$("salary_list").innerHTML = "エラーで読み込めませんでした";

		}
	});

}

function entryclick(){
		
		document.getElementById('submit1').style.display = 'none';
		document.getElementById('fillter').className = 'fillter';
		
		document.getElementById('submit1').disabled = true;
		
		
}

function CheckAll(targetinput){
	var inputs = document.getElementsByTagName('input');
	if(targetinput == 'Cliententry'){
		for (var j=0; j < inputs.length; j ++) {
			var e = inputs[j];
			if (e.type == 'checkbox' && e.name.match(/cliententry/))
				e.checked = true;
		}
	}else if(targetinput == 'add_client'){
		for (var j=0; j < inputs.length; j ++) {
			var e = inputs[j];
			if (e.type == 'checkbox' && e.name.match(/add_client/))
				e.checked = true;
		}
	}
}