/*document.all.onkeydown=function() { 	return true; //2007-2-5 14:35	return KeyDownEvent(); 	}*/function KeyDownEvent(){	if (event.keyCode==8&& window.event.srcElement.type !='text'&& window.event.srcElement.tagName !='TEXTAREA'){		event.keyCode=0;		event.returnValue=false;	}}function zoomimg(img){	var zoom=parseInt(img.style.zoom,10) || 100;	zoom += event.wheelDelta / 24;	imgW = img.clientWidth*zoom/100;	if (zoom>10 && imgW>50)	{		img.style.zoom = zoom + "%";		document.getElementById("WH").innerHTML="ZOOM:" + zoom + "%";	}	return false;}function SelectAll(str,objname) //str=each checkbox name;   objname=checkall checkbox name{	//ljr ff支持  var check_all_name="check_all";  if(objname != void 0)check_all_name=objname;  var a = document.getElementsByName(str);  check_all=document.getElementsByName(check_all_name);  var n = a.length;  for (var i=0; i<n; i++)	 a[i].checked = check_all[0].checked;}function checkItem(str,objname)   //str=checkall checkbox name;   objname=each checkbox name{ 	//ljr ff支持	var check_all_name="checkbox_select[]";	if(objname != void 0)check_all_name=objname;	var a = document.getElementsByName(check_all_name);	check_all=document.getElementsByName(str);	var n = a.length;	for (var i=0; i<n; i++)	{		if(!a[i].checked)		{			check_all[0].checked=false;			return;		}	}	check_all[0].checked=true;	//  var e = window.event.srcElement;//  var all = eval("document.all."+ str);////  if (e.checked)//  {//    var a = document.getElementsByName(e.name);//    all.checked = true;//    for (var i=0; i<a.length; i++)//    {//      if (!a[i].checked){ all.checked = false; break;}//    }//  }//  else all.checked = false;}function refreshGuide(page,total,pagenumber,currentPage){	if(page!=null&&page==1&&total!=null&&total!=0&&pagenumber!=null&&pagenumber>1){		parent.mainguideframe.document.getElementById("totalShow").innerHTML=total;		parent.mainguideframe.document.getElementById("pagenumberShow").innerHTML=pagenumber;		parent.mainguideframe.document.getElementById("total").value=pagenumber;		parent.mainguideframe.document.getElementById("startPos").value=pagenumber;		if(currentPage!=null){			parent.mainguideframe.document.getElementById("currentPage").value=currentPage;			parent.mainguideframe.document.getElementById("startPos").value=currentPage;			parent.mainguideframe.document.getElementById("currentPageShow").innerHTML=currentPage;		}		parent.mainguideframe.document.getElementById("guidediv").style.visibility="visible";        	}else{		parent.mainguideframe.document.getElementById("startPos").value=1;		parent.mainguideframe.document.getElementById("guidediv").style.visibility="hidden";	}}function checktime(obj){	var time=obj;	var time1=time.substr(0,2);	var time2=time.substr(2,2);	if(time1>=24 || time2>=60)	{		return false;	}	else	{		return true;	}}function checkdate(str){	var aaa=str.value;	if(aaa !="" && !CheckDates(aaa.substring(0,4),aaa.substring(4,6),aaa.substring(6,8))||!chkvalidnumberbase(aaa,"") )	{		alert(getmsg("Opera_SeaDateWrong"));		//alert(("Opera_Seadate"+flg+"Wrong"));		str.select();		str.focus();	}}function checkdate1(str){	var aaa=str.value;	if(aaa !="" && !CheckDates(aaa.substring(0,4),aaa.substring(4,6),aaa.substring(6,8))||!chkvalidnumberbase(aaa,"") )	{		alert(getmsg("Opera_SeadateWrong"));		//alert(("Opera_Seadate"+flg+"Wrong"));		str.select();		str.focus();	}}//luqi20070521add--->function checkdate2(str,flg){	var aaa=str.value;	if(aaa !="" && !CheckDates(aaa.substring(0,4),aaa.substring(4,6),aaa.substring(6,8))||!chkvalidnumberbase(aaa,"") )	{		alert(getmsg("Opera_Seadate"+flg+"Wrong"));		//alert(("Opera_Seadate"+flg+"Wrong"));		str.select();		str.focus();	}}function checktime2(str,flg){	if( !chkvalidnumberbase(str.value,""))			{				alert(getmsg("TimeErr"));				str.select();				str.focus();			}			else if(!checktime(str.value))			{				alert(getmsg("TimeErr"));				str.select();				str.focus();			}}function AddZero2(obj,len){	var TMPstr=obj.value+"";	var RTstr=obj.value+"";	if(TMPstr.length<len && TMPstr.length>0)	{		for(i=0;i<len-TMPstr.length;i++)		{			RTstr="0"+RTstr;		}	}	return RTstr;}function AddZero3(obj,len){	var TMPstr=obj+"";	var RTstr=obj+"";	if(TMPstr.length<len && TMPstr.length>0)	{		for(i=0;i<len-TMPstr.length;i++)		{			RTstr="0"+RTstr;		}	}	return RTstr;}function fixdate(obj){	var date=obj.value;	var date2="";	var d = new Date();	var year=d.getYear();	var month=d.getMonth()+1;	month=AddZero3(month,2);	if(date.length <=2 )	{		date=AddZero2(obj,2);			}	else if(date.length <=4)	{		date=AddZero2(obj,4);	}		if (date.length==2)	{				date=""+year+month+date;	}	else if (date.length==4)	{		date=year+date+"";	}	obj.value=date;}//<----endfunction AddZero(obj,len){	var TMPstr=obj.value+"";	var RTstr=obj.value+"";	if(TMPstr.length<len && TMPstr.length>0)	{		for(i=0;i<len-TMPstr.length;i++)		{			RTstr="0"+RTstr;		}	}	obj.value=RTstr;}function logout(){			if(!window.confirm("ログアウトしてもよろしいてすか？"))		{			return false;		}		else		{			document.mainform.action="login.php";			document.mainform.Logout.value='1';						document.mainform.submit();		}}function setGuideHidden(){	parent.mainguideframe.document.getElementById("guidediv").style.visibility="hidden";}function chkvalidCnEn(str){	if(str.length!=0){		for(i=0;i<str.length;i++)		{			if(str.charCodeAt(i)==0x3B){return false;	}					}		var s=trim(str);		if(s.length==0){return false;}	}	return true;}function chkvalidLengthprice(str,intLen,pointLen){	if(str.charAt(0)=='.')	{		return false;	}	else	{		var s_arr=str.split(".");		if(s_arr.length==1)		{			return chkvalidnumberbase(str,".");		}		else if(s_arr.length==2)		{			if(!chkvalidnumberbase(s_arr[0],".")||!chkvalidnumberbase(s_arr[1],"."))				return false;			else			{				if(s_arr[0].length>intLen||s_arr[1].length>pointLen)					return false;			}		}		else		{			return false;		}	}}function chkvalidchar(str){	var spstr="!\"#$%&'()*+,-./:;<=>@[\\]^_`{|}~";	for(i=0;i<str.length;i++)	{		if(spstr.indexOf(str.charAt(i))!=-1)		return false;	}	return true;}function chkvalidprice(str){	var subStr=str;	if(str.charAt(0)=='-'){		subStr=str.substring(1,str.length);	}	return chkvalidnumberbase(subStr,".");}//chkwordfunction chkword(str,maxlen){	/*var i,code;	var wlen=0;	for(i=0;i<str.length;i++)	{		code=str.charCodeAt(i);		if(code>0x7F)		{			wlen+=2;			}		else		{			wlen+=1;				}	}	if(wlen <= maxlen)	{		return true;	}	else	{		return false;	}*/	var i,code;	var wlen=str.length;	if(wlen <= maxlen)	{		return true;	}	else	{		return false;	}}//romanfunction chkvalidromanbase(str,validstr){		var i,code;	for(i=0;i<str.length;i++)	{		code=str.charCodeAt(i);		if(code<0x41||(code>0x5A&&code<0x61)||code>0x7A)		{			if(validstr.indexOf(str.charAt(i))==-1)				return false;		}	}	return true;}function chkroman(str){	return chkvalidromanbase(str,"");}function chkvalidIntPrice(str){	var subStr=str;	for(i=0;i<str.length;i++){		if(str.charAt(i)=='.') return false;	}	if(str.charAt(0)=='-'){		subStr=str.substring(1,str.length);	}	return chkvalidnumberbase(subStr,".");}//charfunction chkvalidcharbase(str,validstr){	var i,code;	for(i=0;i<str.length;i++)	{		code=str.charCodeAt(i);		if(code<0x30||(code>0x39&&code<0x41)||(code>0x5A&&code<0x61)||code>0x7A)		{			if(validstr.indexOf(str.charAt(i))==-1)				return false;		}	}	return true;}function chkvalidpass(str){	return chkvalidcharbase(str,"");}function chkvalidchar(str){	return chkvalidcharbase(str,"!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");}function chkvalidnumberbase(str,validstr){	var i,code;	for(i=0;i<str.length;i++)	{		code=str.charCodeAt(i);		if(code<0x30||code>0x39)		{			if(validstr.indexOf(str.charAt(i))==-1)				return false;		}	}	return true;}function chkvalidstr(validstr){	var invalidStr="!\"#$%&'()*+,.:;<=>?@[\\]^_`{|}~";	var i;	for(i=0;i<validstr.length;i++)	{		if(invalidStr.indexOf(validstr.charAt(i))>-1)			return false;	}	return true;}function chkvalidemail(str){	var supported = 0;	if (window.RegExp)	{		var tempStr = "a";		var tempReg = new RegExp(tempStr);		if (tempReg.test(tempStr)) supported = 1;	}	if (!supported)		return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);	var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");	var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");	return (!r1.test(str) && r2.test(str));}function CheckDates(strYear,strMonth,strDay){		var intMonth = parseInt(strMonth,10);	var strDay = parseInt(strDay,10);	if(intMonth == 1 || intMonth == 3 || intMonth == 5 || intMonth == 7 || intMonth == 8 || intMonth == 10 || intMonth == 12)	{		if(strDay>31||strDay==0)		{						return false;		}		else		{			return true;		}	}	//处理30天的月份	else if(intMonth == 4 || intMonth == 6 || intMonth == 9 || intMonth == 11)	{		if(strDay>30||strDay==0)		{			return false;		}		else		{			return true;		}	}	//处理2月份	else if(intMonth == 2)	{		//闰年		if(isleapyear(strYear))		{						if(strDay>29||strDay==0)			{								return false;			}			else			{				return true;			}		}		//平年		else		{			if(strDay>28||strDay==0)			{				return false;			}			else			{				return true;			}		}		//return 28;	}	else	{		return false;	}}function isleapyear(year){	if ((year%100) == 0)	{		if ((year%400) == 0) return true;	}	else	{		if ((year%4) == 0) return true;	}	return false;}function showCalendar(anchor,inputObj){	var left=getAnchorWindowPosition(anchor).x;	var top=getAnchorWindowPosition(anchor).y+20;	var VFreeArgumentArr=new Array;	VFreeArgumentArr[0]=window;	VFreeArgumentArr[1]="YYYYMmDd";	VFreeArgumentArr[2]=inputObj;	//var dataString = showModalDialog("../template/webctrl/Calendar.tmpl?inputObj="+inputObj, VFreeArgumentArr ,"dialogLeft:"+ (left-198) +";dialogTop:"+top+";dialogWidth:202px;dialogHeight:190px;status:no;help:no;");	var dataString = showModalDialog("../webctrl/Calendar.php?inputObj="+inputObj, VFreeArgumentArr ,"dialogLeft:"+ (left-198) +";dialogTop:"+top+";dialogWidth:202px;dialogHeight:210px;status:0;help:no;");}function zeroprefix(str,len){		 var i,ret;	ret="";    if(str =="") return ret;   	if(len<str.length)	{		ret=str.substr(str.length-len);	}	else	{				for(i=0;i<len-str.length;i++)			ret+="0";		ret+=str;	}	return ret;}function compareDate(strDateOld,strDateNew){	var separator = new Array("-"," ","/",".");	var i,strDateArray,yearOld,monthOld,dayOld,yearNew,monthNew,dayNew;	var intyearOld,intmonthOld,intdayOld,intyearNew,intmonthNew,intdayNew;	// split strDateOld	for (i = 0; i < separator.length; i++)	{		if (strDateOld.indexOf(separator[i]) != -1)		{			strDateArray = strDateOld.split(separator[i]);			if (strDateArray.length == 3)			{				yearOld = strDateArray[0];				monOld = strDateArray[1];				dayOld = strDateArray[2];				if(yearOld.length == 2) yearOld = "20" + yearOld;				break;			}		}	}	if (i==separator.length)	{		if(strDateOld.length==8)		{			yearOld = strDateOld.substr(0, 4);			monOld = strDateOld.substr(4, 2);			dayOld = strDateOld.substr(6);		}	}	// split strDateNew	for (i = 0; i < separator.length; i++)	{		if (strDateNew.indexOf(separator[i]) != -1)		{			strDateArray = strDateNew.split(separator[i]);			if (strDateArray.length == 3)			{				yearNew = strDateArray[0];				monNew = strDateArray[1];				dayNew = strDateArray[2];				if(yearNew.length == 2) yearNew = "20" + yearNew;				break;			}		}	}	if (i==separator.length)	{		if(strDateNew.length==8)		{			yearNew = strDateNew.substr(0, 4);			monNew = strDateNew.substr(4, 2);			dayNew = strDateNew.substr(6);		}	}		//compare	intyearOld=parseInt(yearOld,10);	intmonOld=parseInt(monOld,10);	intdayOld=parseInt(dayOld,10);	intyearNew=parseInt(yearNew,10);	intmonNew=parseInt(monNew,10);	intdayNew=parseInt(dayNew,10);		if(intyearOld>intyearNew) return false;	if(intyearOld<intyearNew) return true;	if(intmonOld>intmonNew) return false;	if(intmonOld<intmonNew) return true;	if(intdayOld>intdayNew) return false;	return true;}function compareCd(startCd,endCd){	if(endCd.length==0) return true;	var startLength=startCd.length;	var endLength=endCd.length;	for(i=0;i<endLength&&i<startLength;i++){		if(startCd.charCodeAt(i)<endCd.charCodeAt(i)) return true;		if(startCd.charCodeAt(i)>endCd.charCodeAt(i)) return false;	}	if(endLength>=startLength){		return true;	}else{		return false;	}}//20021112 for orderby, and only can be used in pc version// split page and orderby method is not so good , now without using common config method to split page and orderby ,,,// ref : common.inc printOrderbyParam($orderfield,$ordersort)//		printOrderFlag($clickfieldname,$fieldname,$ordersort)function setOrderBy(fieldname,actionUrl){	//reset key param.value to 0, otherwise submit to error flow direction	document.mainform.topopt.value=0;	if(actionUrl!=null) document.mainform.action=actionUrl;	document.mainform.cmd.value='interface';	document.mainform.target="_self";		var lastfield=document.getElementsByName("orderfield")[0].value;	if(fieldname==lastfield){		var ordersort=parseInt(document.getElementsByName("ordersort")[0].value);		ordersort=-(ordersort-1);		document.getElementsByName("ordersort")[0].value=ordersort.toString();	}else{		document.getElementsByName("orderfield")[0].value=fieldname;		document.getElementsByName("ordersort")[0].value='0';	}	document.mainform.submit();}//add for  金额的小为校验  //for genka  is chkvalidgenka(str) 在上面1069行  //for urika is chkValidUrika($num)function FormatNumber(srcStr,nAfterDot){　　var srcStr,nAfterDot;　　var resultStr,nTen;　　srcStr = ""+srcStr+"";　　strLen = srcStr.length;　　dotPos = srcStr.indexOf(".",0);　　if (dotPos == -1){　　　　resultStr = srcStr+".";　　　　for (i=0;i<nAfterDot;i++){　　　　　　resultStr = resultStr+"0";　　　　}　　　　return resultStr;　　}　　else{　　　　if ((strLen - dotPos - 1) > nAfterDot){			//xj mod   ［■■■■■■〓ф〓■■■■■■］　　　　　　nAfter = dotPos + nAfterDot + 1;　　　　　　nTen =1;　　　　　　for(j=0;j<nAfterDot;j++){　　　　　　　　nTen = nTen*10;　　　　　　}　　　　　　resultStr = Math.round(parseFloat(srcStr)*nTen)/nTen;		  resultStr=FormatNumber(resultStr,nAfterDot);//xj add   ［■■■■■■〓ф〓■■■■■■］　　　　　　return resultStr;　　　　}　　　　else{　　　　　　resultStr = srcStr;　　　　　　for (i=0;i<(nAfterDot - strLen + dotPos + 1);i++){　　　　　　　　resultStr = resultStr+"0";　　　　　　}　　　　　　return resultStr;　　　　}　　}}function GetObjID(ObjName,destform){ for ( var ObjID=0; ObjID < destform.elements.length; ObjID++ )      if (destform.elements[ObjID].name == ObjName )      {  return(ObjID);         break;      }  return(-1);} //add by zhangfg 2003-11-11function fixDivPosition(){	//should distinguish ie/ns later	titleDiv.style.left = 0;	titleDiv.style.top = document.body.scrollTop;	guideDiv.style.left = 0;	guideDiv.style.top = document.body.scrollTop+body.clientHeight-30;	setTimeout('fixDivPosition()',10);}//2003-11-07 Titlefunction refreshTitleShow(msg){	//alert(msg);	if(parent.maintitleframe.document.getElementById("titleshow")!=null){		var obj = parent.maintitleframe.document.getElementById("titleshow");		obj.innerHTML = msg;	}}function clearTitleButton(){	if(parent.maintitleframe.document.getElementById("titlebuttontd")!=null){		var tdObj =parent.maintitleframe.document.getElementById("titlebuttontd");		var oColl = tdObj.childNodes;		for(var i=(oColl.length-1);i>=0;i--){			oColl.item(i).removeNode(true);		}	}	}function appendTitleButton(nameArr,funcArr){	clearTitleButton();		var tdObj =	parent.maintitleframe.document.getElementById("titlebuttontd");	var input,i;	for(i=0;i<nameArr.length;i++){		input=parent.maintitleframe.document.createElement('input');		input.setAttribute("type","button");		input.setAttribute("value",nameArr[i]);		input.setAttribute("id","btnID"+i);		input.setAttribute("className","ButtonBg",0);		eval("input.onclick = parent.maintitleframe."+funcArr[i]);		tdObj.appendChild(parent.maintitleframe.document.createTextNode("  "));		tdObj.appendChild(input);	}	pageLoad(document.mainform);}function pageLoad(destform){	var i=0;	while(destform.elements[i]!=null){		var Obj=destform.elements[++i];		if(Obj!=null&&((Obj.tagName=='INPUT'&&Obj.type=='text')||Obj.tagName=='SELECT')){			Obj.focus();			if(Obj.type=='text')				Obj.select();			break;		}	}}/**document.getElementsByName=function(sName, thisform){    if(thisform==null)        thisform = document.mainform;    var objarray = new Array();    var j=0;    for (var i = 0; i < thisform.length; i ++)    {        if (thisform[i].name == sName)        {            objarray[j++] = thisform[i];        }    }    return objarray;} *//** * for appendTr function */function cloneTr(flg){    var NoLimitObj = document.getElementById("NoLimit");    var currentIndex=NoLimitObj.value;    var tbody = document.getElementById("tbody");    var sTrObj = document.getElementById("tru" + (currentIndex - 2));    var trObj;    if(sTrObj!=null){	    trObj = sTrObj.cloneNode(true);	    trObj.setAttribute("id","tru"+currentIndex,0);	    refreshSubObj(trObj,currentIndex,flg);	    tbody.appendChild(trObj);    }    sTrObj = document.getElementById("tra" + (currentIndex - 2));    if(sTrObj!=null){	    trObj = sTrObj.cloneNode(true);	    trObj.setAttribute("id","tra"+currentIndex,0);	    refreshSubObj(trObj,currentIndex,flg);	    tbody.appendChild(trObj);    }    sTrObj = document.getElementById("trb" + (currentIndex - 2));    if(sTrObj!=null){	    trObj = sTrObj.cloneNode(true);	    trObj.setAttribute("id","trb"+currentIndex,0);	    refreshSubObj(trObj,currentIndex,flg);	    tbody.appendChild(trObj);    }        sTrObj = document.getElementById("trc" + (currentIndex - 2));    if(sTrObj!=null){	    trObj = sTrObj.cloneNode(true);	    trObj.setAttribute("id","trc"+currentIndex,0);	    refreshSubObj(trObj,currentIndex,flg);	    tbody.appendChild(trObj);    }     sTrObj = document.getElementById("trd" + (currentIndex - 2));    if(sTrObj!=null){	    trObj = sTrObj.cloneNode(true);	    trObj.setAttribute("id","trd"+currentIndex,0);	    refreshSubObj(trObj,currentIndex,flg);	    tbody.appendChild(trObj);    }   try    {       delrow(currentIndex);      ClearItem(currentIndex);      if(flg!="")InitItem(currentIndex);    }    catch (e){}    NoLimitObj.value ++;	//window.scrollTo(0,100000);}function refreshSubObj(obj,appendIndex,flg){    var oColl = obj.childNodes;    var subObj=null;    var salindex = (appendIndex - 2).toString().length;//alert(oColl.length+'\t'+oColl[0].name+'\t'+oColl[0].id);    for(var i=0;i<oColl.length;i++)    {        subObj = oColl.item(i);        if(subObj.id!=null&&subObj.id.length!=0)        {            subObj.setAttribute("id",subObj.id.substr(0,subObj.id.length-salindex)+appendIndex,0);        }        if(subObj.name!=null&&subObj.name.length!=0)        {            if(subObj.name=="spanNo")            {				subObj.innerHTML=(parseInt(appendIndex)+1);            }            else{                subObj.setAttribute("name",subObj.name.substr(0,subObj.name.length-salindex)+appendIndex,0);                           }                    }        //if radio box create another node to replace it        if(subObj.tagName=="INPUT"&&subObj.type=="radio"){        	//var newElement = document.createElement("<INPUT TYPE='RADIO' NAME='"+subObj.name+"' ID='"+subObj.id+"' VALUE='"+subObj.value+"'>")        	if(flg=="")        		var newElement = document.createElement("<INPUT TYPE='RADIO' NAME='"+subObj.name+"' ID='"+subObj.id+"' onfocus=\"textfocus(this.id,'djlx');\" 	onblur=\"textblur(this.name,'djlx');\"	onclick=\"siharaionfocus(this.name,'siharai_');\"  onKeydown=\"var preobj=objfocus(this,'siharai_','pay_');EnterKey(preobj,this.name,'no_'+GetSubThroughCut(this.name, 'siharai_'));\"  VALUE='"+subObj.value+"'>")        	else        		var newElement = document.createElement("<INPUT TYPE='RADIO' NAME='"+subObj.name+"' ID='"+subObj.id+"' VALUE='"+subObj.value+"' >")        	subObj.replaceNode(newElement);        }        if(subObj.hasChildNodes())        {            refreshSubObj(subObj,appendIndex);        }    }}function delrow(p){	var tmp_count="count_"+p;	var count=0;	var i;	for(var i=1;i<9; i++){		sTrObj = document.getElementById("syouhintr"+i+"_" + parseInt(p) );		if(sTrObj!=null) count = sTrObj.childNodes.length;		if(parseInt(count)>0)			{delrows(sTrObj,count);}	}}function delrows(sTrObj,count){	for(var i=0;i<parseInt(count); i++){		sTrObj.removeChild(sTrObj.childNodes[i]);		i=i-1;		count=count-1;	}	}function GetSubThroughCut(sSource, sCut){    return (sSource.substr(sCut.length, sSource.length - sCut.length));}function searchExec(seaType){var count;var nodes = new Array();var nodes2 = new Array();var cd;var name;var area="";if(seaType == "kokyaku"){	count= Window.opener.parent.parent.leftframe.xDoc.getElementsByTagName("root").item(0).childNodes.length;			area =document.mainform.area_cdSelect.value;	cd = new Array(document.mainform.kokyakucdB.value,document.mainform.kokyakucdE.value);	name = document.mainform.kokyakumei.value;}else if(seaType == "siire"){	count= window.opener.parent.parent.leftframe.xDoc2.getElementsByTagName("root").item(0).childNodes.length;	cd = new Array(document.mainform.siirecdB.value,document.mainform.siirecdE.value);	name = document.mainform.siiremei.value;}var j=0;var str;var domnode;var n=document.mainform.kokyakuselect.length;for(i = n - 1; i >= 0; i--)document.mainform.kokyakuselect.options[i] = null;for(i=0;i<count;i++){	if(seaType == "kokyaku"){		domnode=window.opener.parent.parent.leftframe.xDoc.getElementsByTagName("root").item(0).childNodes[i];	}	else if(seaType == "siire"){		domnode=Window.opener.parent.parent.leftframe.xDoc2.getElementsByTagName("root").item(0).childNodes[i];	}	if(cd[0]!="" || cd[1]!=""){		if(cd[0]!=""){			if(("k"+cd[0])>domnode.nodeName){				continue;			}		}		if (cd[1]!=""){			if(("k"+cd[1])<domnode.nodeName){				continue;			}		}	}  	if(area!="" && area!="''"){ 		str=domnode.childNodes[0].nodeName;		re = new RegExp(str.substr(1,(str.length-1)),"i");		if(area.match(re)==null){			continue;		}		}	if(name!=""){			str=domnode.childNodes[0].firstChild.nodeValue;			re = new RegExp(name,"i");			if(str.match(re)==null){				continue;			}			}	NewOptionName = new Option(domnode.childNodes[0].firstChild.nodeValue,domnode.nodeName.substr(1,(domnode.nodeName.length-1))+"@"+domnode.childNodes[0].firstChild.nodeValue+"@"+domnode.childNodes[1].data+"@");        document.mainform.kokyakuselect.options[j+1] = NewOptionName;        j++;} if(j==1){        	document.mainform.kokyakuselect.options[j].selected = true;        	document.mainform.submit();        }//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}function InitItem(name){	var p=name;		var tmp_breakfast="breakfast"+p; 	var obj_breakfast=GetObjID(tmp_breakfast,document.mainform);	if(obj_breakfast!=null){		var obj=document.all(tmp_breakfast);		obj[0].checked=true;	}		var tmp_doss="doss"+p; 	var obj_doss=GetObjID(tmp_doss,document.mainform);	if(obj_doss!=null){		var obj=document.all(tmp_doss);		obj[0].checked=true;	}	}//new frame work flow method end  -- should be put in common... function myunload(){     setGuideHidden();}function enterKeyPress(){	if (event.ctrlKey && event.keyCode == 13)	{		bFlag = false ;		return false ;	}	else	{		if (event.keyCode == 13)		{			event.keyCode = 9 ;			return false ;		}		else		{			return true ;		}	}}function setRegDate(currentObj){	if(isSpecDate(currentObj.value)) return;	var dateStr;	if(trim(currentObj.value)!=''){			dateStr = getRegDateStr(currentObj.value);	}	if(dateStr!=null&&trim(dateStr)!=''){		if(chkvaliddate(dateStr)){			currentObj.value = dateStr;		}else{			alert(getmsg("comDateChk"));			currentObj.focus();		}	}}function isSpecDate(s){	if(s=='SPEC_DATE1'||s=='SPEC_DATE2'||s=='SPEC_DATE3'||s=='SPEC_DATE4'){		return true;	}else{		return false;	}}function getRegDateStr(s){	var d = getDateObj(s);	if(d==false) return 'false';	var separator = '/';	return d.getYear()+separator+zeroprefix((d.getMonth()+1).toString(),2)+separator+zeroprefix(d.getDate().toString(),2);}function getDateObj(dateStr){	var separator = new Array("-"," ","/",".");	var year,month,day;	var d = new Date();	for (i = 0; i < separator.length; i++)	{		if (dateStr.indexOf(separator[i]) != -1)		{			strDateArray = dateStr.split(separator[i]);			if (strDateArray.length == 3)			{				year = strDateArray[0];				month = parseInt(strDateArray[1],10)-1;				day = strDateArray[2];				if(year.length == 2) year = "20" + year;				break;			}		}	}	if(year==null||year==''||month==null||month===''||day==null||day==''){		var len = dateStr.length;				if(len<=2){			year = d.getYear();			month=d.getMonth();			day=dateStr;		}else if(len<=4){			year = d.getYear();			month=parseInt(dateStr.substring(0,len-2),10)-1;			day=dateStr.substr(len-2,2);		}else if(len<=6){			year = '20'+zeroprefix(dateStr.substring(0,len-4),2);			month=parseInt(dateStr.substr(len-4,2),10)-1;			day=dateStr.substr(len-2,2);		}else if(len==8){			year = dateStr.substring(0,4);			month=parseInt(dateStr.substr(len-4,2),10)-1;			day=dateStr.substr(len-2,2);		}	}	//for common use , do not auto convert special data such as 9999 to reg date, so judge if the date regular or not	var intday = parseInt(day, 10);	var intmon = parseInt(month, 10)+1;	var intyear = parseInt(year, 10);	if (isNaN(intday)||isNaN(intmon)||isNaN(intyear)) return false;		if (intmon>12 || intmon<1) return false;	if (intmon == 1 || intmon == 3 || intmon == 5 || intmon == 7 || intmon == 8 || intmon == 10 || intmon == 12) maxday=31;	if (intmon == 4 || intmon == 6 || intmon == 9 || intmon == 11) maxday=30;	if (intmon == 2)	{		if (isleapyear(intyear) == true) maxday=29;		else maxday=28;	}	if(intday > maxday || intday < 1) return false;			d.setFullYear(year,month,day);	return d;}function ChangeOptions(obj){	if(obj==null) return false;	var len=obj[0].options.length;	var checknum=0;	for(i=0;i<len;i++)	{		if(obj[0].options[i].selected==true) checknum++;	}	for(i=0;i<len;i++)	{		if(checknum>=1) //has some options have been selected,to clear all		{			obj[0].options[i].selected=false;		}		else //not any option has been selected,to select al		{			obj[0].options[i].selected=true;		}	}}function lTrim(str){	if (str.charAt(0) == " ")	{		str = str.slice(1);		//str = str.substring(1, str.length);		str = lTrim(str);	}	return str;}function rTrim(str){	var iLength = str.length;	if (str.charAt(iLength - 1) == " ")	{		str = str.slice(0, iLength - 1);		//str = str.substring(0, iLength - 1);		str = rTrim(str);	}	return str;}function trim(str){	return lTrim(rTrim(str));}//function validateDate(year, month, day) //{//    var regex = new RegExp(/S/);  //    if(regex.test(day)&& regex.test(month) && regex.test(year)) //    {//        var regExp = new RegExp(/d/);//        if(!regExp.test(day)|| !regExp.test(month) || !regExp.test(year))//            return false;//        var tempDateValue = year + "/" + month + "/" + day;//        if(tempDateValue.length < 6||tempDateValue.length > 10)//            return false;; //        var tempDate = new Date(tempDateValue);//        if(isNaN(tempDate))//            return false;;   //        if(parseInt(year) > 1900 && parseInt(year) < 2500 && ((tempDate.getFullYear//()).toString()==year) && (tempDate.getMonth()==parseInt(month)-1) && (tempDate.getDate()//==parseInt(day)))//            return true;//        else//            return false;;//    }//}function validateDate(str) {	if(str == "")        return true;    var pattern = /^((\\d{4})|(\\d{2}))-(\\d{1,2})-(\\d{1,2})$/g;    if(!pattern.test(str))        return false;    var arrDate = str.split("-");    if(parseInt(arrDate[0],10) < 100)        arrDate[0] = 2000 + parseInt(arrDate[0],10) + "";    var date =  new Date(arrDate[0],(parseInt(arrDate[1],10) -1)+"",arrDate[2]);    if(date.getYear() == arrDate[0]       && date.getMonth() == (parseInt(arrDate[1],10) -1)+""       && date.getDate() == arrDate[2])        return true;    else        return false;}	// ===================================================================// Author: Matt Kruse <matt@mattkruse.com>// WWW: http://www.mattkruse.com///// NOTICE: You may use this code for any purpose, commercial or// private, without any further permission from the author. You may// remove this notice from your final code if you wish, however it is// appreciated by the author if at least my web site address is kept.//// You may *NOT* re-distribute this code in any way except through its// use. That means, you can include it in your product, or your web// site, or any other form where the code is actually being used. You// may not put the plain javascript up on your site for download or// include it in your javascript libraries for download. Instead,// please just point to my URL to ensure the most up-to-date versions// of the files. Thanks.// ===================================================================/* AnchorPosition.jsAuthor: Matt KruseLast modified: 2/18/02DESCRIPTION: These functions find the position of an <A> tag in a document,so other elements can be positioned relative to it.COMPATABILITY: Works with Netscape 4.x, 6.x, IE 5.x on Windows. Some smallpositioning errors - usually with Window positioning - occur on the Macintosh platform.FUNCTIONS:getAnchorPosition(anchorname)  Returns an Object() having .x and .y properties of the pixel coordinates  of the upper-left corner of the anchor. Position is relative to the PAGE.getAnchorWindowPosition(anchorname)  Returns an Object() having .x and .y properties of the pixel coordinates  of the upper-left corner of the anchor, relative to the WHOLE SCREEN.NOTES:1) For popping up separate browser windows, use getAnchorWindowPosition.    Otherwise, use getAnchorPosition2) Your anchor tag MUST contain both NAME and ID attributes which are the    same. For example:   <A NAME="test" ID="test"> </A>3) There must be at least a space between <A> </A> for IE5.5 to see the    anchor tag correctly. Do not do <A></A> with no space.*/ // getAnchorPosition(anchorname)//   This function returns an object having .x and .y properties which are the coordinates//   of the named anchor, relative to the page.function getAnchorPosition(anchorname) {	// This function will return an Object with x and y properties	var useWindow=false;	var coordinates=new Object();	var x=0,y=0;	// Browser capability sniffing	var use_gebi=false, use_css=false, use_layers=false;	if (document.getElementById) { use_gebi=true; }	else if (document.all) { use_css=true; }	else if (document.layers) { use_layers=true; }	// Logic to find position 	if (use_gebi && document.all) {		x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);		y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);		}	else if (use_gebi) {		var o=document.getElementById(anchorname);		x=o.offsetLeft; y=o.offsetTop;		} 	else if (use_css) {		x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);		y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);		}	else if (use_layers) {		var found=0;		for (var i=0; i<document.anchors.length; i++) {			if (document.anchors[i].name==anchorname) { found=1; break; }			}		if (found==0) {			coordinates.x=0; coordinates.y=0; return coordinates;			}		x=document.anchors[i].x;		y=document.anchors[i].y;		}	else {		coordinates.x=0; coordinates.y=0; return coordinates;		}	coordinates.x=x;	coordinates.y=y;	return coordinates;	}// getAnchorWindowPosition(anchorname)//   This function returns an object having .x and .y properties which are the coordinates//   of the named anchor, relative to the windowfunction getAnchorWindowPosition(anchorname) {	var coordinates=getAnchorPosition(anchorname);	var x=0;	var y=0;	if (document.getElementById) {		if (isNaN(window.screenX)) {			x=coordinates.x-document.body.scrollLeft+window.screenLeft;			y=coordinates.y-document.body.scrollTop+window.screenTop;			}		else {			x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;			y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;			}		}	else if (document.all) {		x=coordinates.x-document.body.scrollLeft+window.screenLeft;		y=coordinates.y-document.body.scrollTop+window.screenTop;		}	else if (document.layers) {		x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;		y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;		}	coordinates.x=x;	coordinates.y=y;	return coordinates;	}// Functions for IE to get position of an objectfunction AnchorPosition_getPageOffsetLeft (el) {	var ol=el.offsetLeft;	while ((el=el.offsetParent) != null) { ol += el.offsetLeft; }	return ol;	}function AnchorPosition_getWindowOffsetLeft (el) {	return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;	}	function AnchorPosition_getPageOffsetTop (el) {	var ot=el.offsetTop;	while((el=el.offsetParent) != null) { ot += el.offsetTop; }	return ot;	}function AnchorPosition_getWindowOffsetTop (el) {	return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;	}	function chkvalidfloatnumber(str,validstr,ZSlen,XSlen){	var i,code,count=0;	for(i=0;i<str.length;i++)	{		code=str.charCodeAt(i);		if(code<0x30||code>0x39)		{			if(validstr.indexOf(str.charAt(i)) != -1 )			{				if (i==0 || i==str.length-1)				{					return false;				}				else				{					count++;				}			}			else			{					return false;			}		}	}	if (count>1)	{		return false;	}	if (ZSlen!="")	{		if(count==0)		{			str=parseInt(str);			if(str>=Math.pow(10,ZSlen))			{				return false;			}		}		else		{			var temp=str.split(".");			var len1=temp[0].length;			var len2=temp[1].length;			if(len1<=ZSlen && len2<=XSlen)			{				return true;			}			else			{				return false;			}					}	}	return true;}var MM_load_num=0;var MM_pi=new Array();var divHeight=80;var divWidth=130;function MM_loadImages(){	var dm=document;	if(dm.images)	{		if(!dm.MM_pi) dm.MM_pi=new Array();	    var i,j=dm.MM_pi.length;	    var arg=MM_loadImages.arguments;	    MM_load_num=arg.length;		for(i=0; i<arg.length; i++)		{			if (arg[i].indexOf("#")!=0)			{				dm.MM_pi[j]=new Image;//				alert("j="+j);				dm.MM_pi[j].src=arg[i];				j++;			}		}	}	MM_convImagesWH();}function MM_convImagesWH(){	var dm=document;	for(m=0;m<2000;m++){ var k=0;}	alert(MM_load_num);	alert(divWidth);	alert(divHeight);	for(i=1;i<MM_load_num;i++)	{		var idStr="Front_img"+(i-1);		var idObj=dm.getElementById(idStr);		if(idObj && i<dm.MM_pi.length)		{			alert(MM_pi[i].height);			alert(dm.MM_pi[i].width);								if(dm.MM_pi[i].height<=divHeight&&dm.MM_pi[i].width<=divWidth){					idObj.height=dm.MM_pi[i].height;					idObj.width=dm.MM_pi[i].width;			}else{				rate1=divWidth/parseInt(dm.MM_pi[i].width);				rate2=divHeight/parseInt(dm.MM_pi[i].height);				rate=Math.min(rate1,rate2);				if((dm.MM_pi[i].width>divWidth&&dm.MM_pi[i].width>(dm.MM_pi[i].width*rate))||(dm.MM_pi[i].height>divHeight&&dm.MM_pi[i].height>(dm.MM_pi[i].height*rate)))				{					idObj.width=parseInt(dm.MM_pi[i].width*rate);					idObj.height=parseInt(dm.MM_pi[i].height*rate);				}			}		}		idObj.src=dm.MM_pi[i].src;	}}//chkmoney+getPosition//<--开始function getPosition(obj){		var result = 0;	if(obj.selectionStart)	{			result = obj.selectionStart;	}	else	{		var rng;		if(obj.tagName == "TEXTAREA")		{			rng = event.srcElement.createTextRange();			rng.moveToPoint(event.x,event.y);		}		else		{			rng = document.selection.createRange();		}		rng.moveStart("character",-event.srcElement.value.length);		result = rng.text.length;	}	return result;}function chkmoney(obj,flg){	flg=parseInt(flg);	obj.setAttribute("onblur",function(){				var tmp="";		var sData=obj.value.split('.');		var counter=0;		for(var i=sData[0].length-1;i>=0;i--)		{			tmp=sData[0].charAt(i)+tmp; 			counter++;			if(counter==3) 			{				counter   =   0; 				if(i!=0) 				tmp   =   ","   +   tmp; 			}		}		if(sData.length>1)		{			obj.value=tmp+"."+sData[1];		}		else		{			obj.value=tmp;		}	});	obj.setAttribute("onkeypress",function(){		var str;		var str1;		var str2;		var str3;		var sData;		str1=obj.value.substr(0,getPosition(obj)-document.selection.createRange().text.length);		str2=String.fromCharCode(event.keyCode);		str3=obj.value.substr(getPosition(obj));		str = str1+str2+str3;		if(isNaN(str))		{					return false;		}		if(str2=='.'&&flg==0)			return false;		sData=str.split(".");		//小数点前5位		if(sData[0].length>5)return false;					//小数点后2位		if(sData.length==2)		{			if (sData[1].length>flg)			{				return false;			}		}			return true;	});		var tmp=obj.value;			while(tmp.indexOf(",")>0)	{		tmp=tmp.replace(",","");	}	obj.value=tmp;			obj.select();	obj.style.imeMode='disabled';	if(flg==0)		obj.maxLength=5;	else		obj.maxLength=6+flg;	var str;	var sData;	str = obj.value;	if(isNaN(str))	{				return false;	}		sData=str.split(".");	//小数点前5位	if(sData[0].length>5)return false;			//小数点后2位	if(sData.length==2)	{		if (sData[1].length>flg)		{			return false;		}	}		return true;	}//结束-->function isnumeric(s) //by zergling{    var patrn= /^\d{1,5}(\.\d{1,2})?$/;    if (!patrn.exec(s)) return false    return true}function gotologin(){	if(window.parent.parent!=null)	{					//document.titleform.exitsystem.value='true';			window.parent.parent.parent.location.href="login.php";			}else{		window.parent.parent.location.href="login.php";	}}//<--开始var docEle = function(){    return document.getElementById(arguments[0]) || false;}function setDiv(_id){	var obj = docEle(_id);	obj.style.display="none"; 		}function g_closeDiv(_id){	var m = "mask";        if (docEle(m)) document.body.removeChild(docEle(m));	var obj = docEle(_id);	obj.style.display="none";}function g_openDiv(_id) {	    var m = "mask";        if (docEle(m)) document.body.removeChild(docEle(m));        //mask遮罩层    var newMask = document.createElement("div");    newMask.id = m;    newMask.style.position = "absolute";    newMask.style.zIndex = "1";	    _scrollWidth = Math.min(document.body.scrollWidth,document.documentElement.scrollWidth);    _scrollHeight = Math.max(document.body.scrollHeight,document.documentElement.scrollHeight);    newMask.style.width = _scrollWidth + "px";    newMask.style.height = _scrollHeight + "px";    newMask.style.top = "0px";    newMask.style.left = "0px";    newMask.style.background = "#33393C";    newMask.style.filter = "alpha(opacity=40)";    newMask.style.opacity = "0.40";    document.body.appendChild(newMask);        //新弹出层    var newDiv = docEle(_id);    newDiv.id = _id;    newDiv.style.position = "absolute";    newDiv.style.zIndex = "9999";	newDiv.style.display="inline";     newDivWidth = newDiv.offsetWidth;    newDivHeight = newDiv.offsetHeight;    newDiv.style.top = (document.body.scrollTop + document.body.clientHeight/2 - newDivHeight/2) + "px";    newDiv.style.left = (document.body.scrollLeft + document.body.clientWidth/2 - newDivWidth/2) + "px";    newDiv.style.background = "#EFEFEF";    newDiv.style.border = "1px solid #860001";    newDiv.style.padding = "5px";   		    		//var w = newDiv.clientWidth||newDiv.offsetWidth;			//alert("Div1's width is "+newDiv.clientWidth);	//alert("Div1's width is "+newDiv.offsetWidth);	//alert("Div1's width is "+newDiv.offsetHeight);	//alert("Div1's width is "+w);    //弹出层滚动居中    function newDivCenter()    {        //newDiv.style.top = (document.body.scrollTop + document.body.clientHeight/2 - newDivHeight/2) + "px";        //newDiv.style.left = (document.body.scrollLeft + document.body.clientWidth/2 - newDivWidth/2) + "px";    }    if(document.all)    {        window.attachEvent("onscroll",newDivCenter);    }    else    {        window.addEventListener('scroll',newDivCenter,false);    }    	}//结束-->//chkmoney+getPosition//<--开始function DrawImage(ImgD,width_s,height_s){			var image=new Image();	image.src=ImgD.src;		if(width_s < image.width || height_s < image.height){				tmpscale = image.width / width_s		if(tmpscale<image.height / height_s){			tmpscale = image.height / height_s		}				ImgD.width = image.width / tmpscale		ImgD.height = image.height / tmpscale			}else if(width_s >= image.width && height_s >= image.height){		ImgD.width = image.width		ImgD.height = image.height	}}function DrawImage2(ImgD,width_s,height_s){	/*var width_s=139;	var height_s=104;	*/	//return false;		var image=new Image();	image.src=ImgD.src;	img_width=image.width;	if(image.width>0 && image.height>0){		flag=true;		if(image.width/image.height>=width_s/height_s){			if(img_width>2000){				alert("1");					}						if(img_width>2000){				alert(image.width);					}			if(img_width>2000){				alert(width_s);					}			if(image.width>width_s){				if(img_width>2000){					alert("2");						}				ImgD.width=width_s;				if(img_width>2000){					alert("imagewidth="+image.width+",imageheight="+image.height+"ImgDwidth="+ImgD.width+",ImgDheight="+ImgD.height);						}						ImgD.height=(image.height*width_s)/image.width;				if(img_width>2000){					alert("imagewidth="+image.width+",imageheight="+image.height+"ImgDwidth="+ImgD.width+",ImgDheight="+ImgD.height);						}					}else{				ImgD.width=image.width;				ImgD.height=image.height;			}		}		else{			if(image.height>height_s){				ImgD.height=height_s;				ImgD.width=(image.width*height_s)/image.height;			}else{				ImgD.width=image.width;				ImgD.height=image.height;			}		}	}	//alert(ImgD.src);		if(image.width>2000){		alert("imagewidth="+image.width+",imageheight="+image.height+"ImgDwidth="+ImgD.width+",ImgDheight="+ImgD.height);			}		/*else{	ImgD.src="";	ImgD.alt=""	}*/}//fc20091209function set_maxlength(obj,len){	var isIE = (document.all && window.ActiveXObject && !window.opera) ? true : false;		if (isIE){		obj.setAttribute("onkeyup",function(){					if(obj.value.length > len){				obj.value=this.value.substr(0,len)			}					});	}else{		/*obj.setAttribute("onkeyup","					if(this.value.length > len){				this.value=this.value.substr(0,len)			}					");*/	}	}function textarea_maxlen(o,nMaxLen){	//var nMaxLen=o.getAttribute? parseInt(o.getAttribute("maxlength")):"";  	if(o.getAttribute && o.value.length>nMaxLen-3){  		o.value=o.value.substring(0,nMaxLen-3)  	}  }/*function addslashes(str){ str=str.replace(/'/g,"'"); str=str.replace(/"/g,'"'); str=str.replace(//g,""); str=str.replace(//g,''); return str;}function stripslashes(str){ str=str.replace(/'/g,"'"); str=str.replace(/"/g,'"'); str=str.replace(//g,""); str=str.replace(//g,''); return str;}*/function addslashes( str ) {	//alert((str+'').replace(/([\\"'])/g, "\\$1").replace(/\0/g, "\\0"));	return (str+'').replace("'","\\'").replace('"','\\"').replace("'","&#039;").replace('"','&quot;');	//return (str+'').replace(/([\\"'])/g, "\\$1").replace(/\0/g, "\\0"); }function in_array(str,obj){	var i=0;	for(i=0;i<obj.length;i++) 	{  		if(obj[i] == str)  			return true;  	} 	return false;}function get_scrollTop(id){	var st=0;	try{				if(id==""){			if(window.pageYOffset)     		    {    		       st=window.pageYOffset;     		    }    		    else if(document.documentElement)     		    {       		        st=document.documentElement.scrollTop;       		    }    		    else if(document.body)     		    {    		        st=document.body.scrollTop;          		    }		}else{			var obj=document.getElementById(id);			if(obj){				st=obj.scrollTop;			}		}	}	catch(err){			}		return st;}function set_scrollTop(id,st){		try{				if(id==""){			/*if(typeof(window.pageYOffset)!="undefined")     		    {		    	alert("1");		       window.pageYOffset=st;     		    }    		    else*/ /*if(document.documentElement)     		    { 		        document.documentElement.scrollTop=st;       		    }    		    else if(document.body)     		    { 		        document.body.scrollTop=st;          		    }*/		    window.scrollTo(0, st);		}else{			var obj=document.getElementById(id);			if(obj){				obj.scrollTop=st;			}		}			}	catch(err){			}}function format_getElementsByName(obj_array){	var return_arr = new Array();	if(typeof(obj_array)!="undefined"){		 var i=0;		 for(i=0;i<obj_array.length;i++){			return_arr[i]=obj_array[i];		 }	}	return return_arr;}
