<!--

function openScript(url, width, height) {
        var Win = window.open(url,'_blank','width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );
}


//share js------------------------------------------------------//
function popwin_path_id(path,id)
{ window.open(path+"?id="+id,"","height=400,width=750,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}



//share js------------------------------------------------------//
function openwin(Url)
{
  msgwin=window.open(Url,"msg","left=0,top=0,width=750,height=300,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
  msgwin.focus();
	return;
}

//share js------------------------------------------------------//
function js_callpage(url) {
 var newwin=window.open(url,"homeWin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=300,height=280");
return false;
}


//reloads the window if Nav4 resized-----------------------------//
function MM_reloadPage(init) {  
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


//mouseover note ------------------------------------------------//
function foon(idn) 
{ 
idn.style.visibility="visible" 
idn.style.position="absolute" 
idn.style.left=event.clientX+15 
idn.style.top=event.clientY-10 
} 
function hidefoon(idn) 
{ 
idn.style.visibility="hidden" 
} 

function openwindow(url) {
   window.open(url,'new','resizable=1,scrollbars=yes,menubar=no,status=yes,width=650,height=550');
    }


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);



//start of czt_program
function czt_selected_add() {
czt_selected_object=document.selection.createRange();
czt_selected_word=czt_selected_object.text;
if(czt_selected_word!='')
	{
	czt_selected_word=czt_replace_word(czt_selected_word,'&',"[＆]");
	czt_selected_word=czt_replace_word(czt_selected_word,'?',"[？]");
	czt_selected_word=czt_replace_word(czt_selected_word,':',"[：]");
	czt_selected_word=czt_replace_word(czt_selected_word,'#',"[＃]");
	czt_selected_word=czt_replace_word(czt_selected_word,'\n',"<br>");

	document.frames['favorityframe'].favorityform.favority.value=czt_selected_word ;
	document.frames['favorityframe'].favorityform.submit() ;


//	  document.frames['favorityframe'].location.replace('/favority/cool_copy_add.asp?favority='+czt_selected_word);
	}
	else
	{
	  alert('请用鼠标选定要复制的部分，然后再点击这里。')
	}
}


function czt_replace_word(selected_word,filter_key,replace_key)
  {
        var checkStr ;
        var checkKey ;
        var replaceKey ;
        var tmp_word = "" ;
        checkStr = selected_word ;
        checkKey = filter_key ;
        replaceKey = replace_key ;
	for (i = 0;  i < checkStr.length;  i++)
	{
		ch = checkStr.charAt(i);
		if (ch != checkKey)
		    {
		    	 tmp_word = tmp_word + ch ;
		     }
		else
		    {
		    	 tmp_word = tmp_word + replaceKey ;
		    }
	}
    return(tmp_word) ;
   }



//end of czt_program
function openwindow(url) {
   window.open(url,'new','resizable=1,scrollbars=yes,menubar=no,status=yes,width=800,height=600');
    }

function over() {
    window.event.srcElement.style.filter = "alpha(opacity=100)";
}

function out() {
    window.event.srcElement.style.filter = "alpha(opacity=90)";
}

//Check if the city is match with the zipcode. If they are not match, system will popup window to make user have a choice: adding it as a new city or replace it with the existent city in ABCIS.
//Added by Cai Zhitong in 2006-3-22
function CheckCityAndZipCode(objCity,objZipCode,objState)
	{
		if(objCity.value.length > 0 && objZipCode.value.length > 0 && objState.value.length > 0)
		{

			var i,ch,cityname="",checkKey=" ",replaceKey="%20";
			for (i = 0;  i < objCity.value.length;  i++)
			{
				ch = objCity.value.charAt(i);
				if (ch != checkKey)
				    {
				    	 cityname = cityname + ch ;
				     }
				else
				    {
				    	 cityname = cityname + replaceKey ;
				    }
			}


		var DataToSend = "city=" + cityname + "&zipcode=" + objZipCode.value + "&state=" + objState.value;
		var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		xmlhttp.Open("POST","/CheckCityMatch.asp",false);
		xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlhttp.send(DataToSend);
		
		if(xmlhttp.responseText == "1")
			{
			var strReturn = window.showModalDialog("/ShowCityMatch.asp?city=" + objCity.value + "&zipcode=" + objZipCode.value + "&state=" + objState.value,"frmCityMatch","dialogWidth:450px;dialogHeight:300px;scroll:yes;status:no");
			if(strReturn!='undefined')
				{
					var objArray = new Array();
					objArray = strReturn.split("^");
					objCity.value = objArray[0];
					objState.value = objArray[1];
				}
			}
		}
		else
		{
		return false;
		}
	}

function ConfirmName(FirstName,LastName,FirstNamePre,LastNamePre)
	{
	var strReturn = window.showModalDialog("/Step4/ShowNameConfirmMsg.asp?FirstName=" + FirstName + "&LastName=" + LastName + "&FirstNamePre=" + FirstNamePre + "&LastNamePre=" + LastNamePre,"frmNameConfirmMsg","dialogWidth:600px;dialogHeight:350px;scroll:yes;status:no");

	}
//-->