﻿if(top.location.href!==self.location.href&&document.location.href.indexOf('uupei')== -1&&document.location.href.indexOf('localhost')== -1){top.location.href=self.location.href;}function MM_jumpMenu(targ,selObj,restore){eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");if(restore)selObj.selectedIndex=0;};function LTrim(str){if(str==null){return null;}for(var i=0;str.charAt(i)==" ";i++);return str.substring(i,str.length);};function RTrim(str){if(str==null){return null;}for(var i=str.length-1;str.charAt(i)==" ";i--);return str.substring(0,i+1);};function Trim(str){return LTrim(RTrim(str));};function LTrimAll(str){if(str==null){return str;}for(var i=0;str.charAt(i)==" "||str.charAt(i)=="\n"||str.charAt(i)=="\t";i++);return str.substring(i,str.length);};function RTrimAll(str){if(str==null){return str;}for(var i=str.length-1;str.charAt(i)==" "||str.charAt(i)=="\n"||str.charAt(i)=="\t";i--);return str.substring(0,i+1);};function TrimAll(str){return LTrimAll(RTrimAll(str));};function isNull(val){return(val==null);};function isBlank(val){if(val==""){return true;}else if(TrimAll(val).length==0){return true;}else{return false;}};function isInteger(val){if(isBlank(val)){return false;}for(var i=0;i<val.length;i++){if(!isDigit(val.charAt(i))){return false;}}return true;};function isNumeric(val){return(parseFloat(val,10)==(val*1));};function isArray(obj){return(typeof(obj.length)=="undefined")?false:true;};function isDigit(num){if(num.length>1){return false;}var string="1234567890";if(string.indexOf(num)!= -1){return true;}else{return false;}};function isEsc(obj){for(var pwIndex=0;pwIndex<obj.value.length;pwIndex++){var cCheck=obj.value.charAt(pwIndex);if(cCheck=='：'||cCheck==':'||cCheck=='\''||cCheck=='"'||cCheck=='+'||cCheck=='&'||cCheck=='%'){return true;}}};function setNullIfBlank(obj){if(isBlank(obj.value)){obj.value="";}};function setFieldsToUpperCase(){for(var i=0;i<arguments.length;i++){arguments[i].value=arguments[i].value.toUpperCase();}};function readCookie(name){if(document.cookie==''){return '';}else{return getCookie(name);}};function setCookie(name,value,oExpires,oPath){var expires=new Date();expires.setTime(expires.getTime()+oExpires);document.cookie=name+'='+encodeURI(value)+((oExpires)?'; expires='+expires.toGMTString():'')+((oPath)?'; path='+oPath:'; path=/');};function getCookie(name){var firstChar,lastChar;var cookies=document.cookie;firstChar=cookies.indexOf(name);if(firstChar!= -1){firstChar+=name.length+1;lastChar=cookies.indexOf(';',firstChar);if(lastChar== -1){lastChar=cookies.length;}return decodeURI(cookies.substring(firstChar,lastChar));}else{return '';}};function deleteCookie(name,path){if(getCookie(name)){document.cookie=name+'='+((path)?'; path='+path:'; path=/')+'; expires=Thu, 01-Jan-80 00:00:01 GMT';}};function getRadioValue(RadioArray){var i;for(i=0;i<RadioArray.length;i++){if(RadioArray[i].checked){return RadioArray[i].value;}}return "";};function setRadioValue(RadioArray,initV){var i;for(i=0;i<RadioArray.length;i++){if(RadioArray[i].value==initV){RadioArray[i].checked=true;}}};function IsNum(code){var charcode=(navigator.appName=="Netscape")?code.which:code.keyCode;if(charcode>31&&(charcode<48||charcode>57||charcode==46)&&charcode!=45){return false;}return true;};function hidBoxs(objid){document.getElementById(objid).style.display='none';};function showBoxs(objid){document.getElementById(objid).style.display='block';};function setFormElementValue(elementName,elementValue){document.getElementById(elementName).value=elementValue;};function initSelectElement(elementName,elementValue){var selObj=document.getElementById(elementName);for(i=0;i<selObj.options.length;i++){if(selObj.options[i].value==elementValue){selObj.selectedIndex=i;}}};function dialogWindow(url,id,width,height){window.open(url,id,"width="+width+",height="+height+",toolbar=0,location=0,status=0,menubar=0,resizable=yes,scrollbars=1,left=0,top=0");};function dialogWindowPlace(url,id,width,height,left,top){window.open(url,id,"width="+width+",height="+height+",toolbar=0,location=0,status=0,menubar=0,resizable=yes,scrollbars=1,left="+left+",top="+top);};function dialogToolWindow(url,id,width,height){window.open(url,id,"width="+width+",height="+height+",toolbar=1,location=1,status=0,menubar=0,resizable=yes,scrollbars=1,left=0,top=0");};function doSubstr(obj){var obj=document.getElementById(obj);obj.value=obj.value.substr(0,obj.value.length-1);return obj.value;};function cancel(){window.close();};function doReturn(){history.go(-1);};$(document).ready(function(){if($("input[@type='text'], input[@type='password']")==undefined)return;$("input[@type='text'], input[@type='password']").addClass("txt");$("input[@type='text'], input[@type='password'], textarea").focus(function(){$(this).removeClass("txt"),$(this).addClass("txtFocus");}).blur(function(){$(this).removeClass("txtFocus"),$(this).addClass("txt")});});function tabslt(ele){$(ele).addClass("selected").siblings().removeClass("selected");};function switchTab(ele,index){tabslt(ele);$("#MainContent").find(".TabContent").eq(index).show().siblings(".TabContent").hide();};function setTab(tbid,tbtg,tbcn,tbsh,eve){if(!eve){eve="click"};if(eve=="click"){$(tbid).find(tbtg).each(function(i){$(tbid).find(tbtg).eq(i).click(function(){tabslt(this);$(tbcn).find(tbsh).eq(i).show().siblings(tbsh).hide();})})}if(eve=="mouseover"){$(tbid).find(tbtg).each(function(i){$(tbid).find(tbtg).eq(i).mouseover(function(){tabslt(this);$(tbcn).find(tbsh).eq(i).show().siblings(tbsh).hide();})})}};function pageReload(){window.location.href=window.location.href;};function getSeparator(val,sp){var formatText=val;formatText=formatText.replace(/;/g,sp);formatText=formatText.replace(/；/g,sp);formatText=formatText.replace(/ /g,sp);formatText=formatText.replace(/　/g,sp);formatText=formatText.replace(/、/g,sp);formatText=formatText.replace(/,/g,sp);formatText=formatText.replace(/，/g,sp);return formatText;};var old_honoff=0;function showOption(){if(old_honoff==0){document.getElementById("oSearch").style.display='block';old_honoff=1;}else{document.getElementById("oSearch").style.display='none';old_honoff=0;}};var layerclosetimer=null;function showlayernormal(layerid,target){try{clearTimeout(layerclosetimer)}catch(error){}var obj=document.getElementById(layerid);for(var targetol=0,targetot=0,ctarget=target;(ctarget.tagName.toLowerCase()!='body'&&ctarget.tagName.toLowerCase()!='html');ctarget=ctarget.offsetParent){targetol+=ctarget.offsetLeft;targetot+=ctarget.offsetTop;}obj.style.left=(targetol-9)+'px';obj.style.top=(targetot+17)+'px';obj.style.display='block';if(layerid=="mysale"){if(document.getElementById("myuu")!=null){document.getElementById("myuu").style.display="none";}}else if(layerid=="myuu"){if(document.getElementById("mysale")!=null){document.getElementById("mysale").style.display="none";}}target.onmouseout=function(){layerclosetimer=setTimeout('document.getElementById("'+layerid+'").style.display="none"',100);};obj.onmouseover=function(){clearTimeout(layerclosetimer);};obj.onmouseout=function(){layerclosetimer=setTimeout('document.getElementById("'+layerid+'").style.display="none"',100);}} 
