//Assigns the URL variable to open a new window. Double click to get the whole IPA chart
	function GetIPA(NAME){ 
			var url ="../../../templates/ipa-pop-up-1.cfm?ID="+NAME;
			var hWnd = window.open(url,"","width=650,height=650,resizable=yes,status=yes,toolbar=no, menubar=no,scrollbars=yes");
			if ((document.window != null) && (!hWnd.opener))
			hWnd.opener = document.window;
	}
	
//Assigns the URL variable to open a new window. Right click to get the similar character
	function GetIPA2(NAME){
		    var temp1 = (eval("document.form1."+NAME+".value")).length-1;
			var temp4 = (eval("document.form1."+NAME+".value")).charAt(temp1);
			var url = "../../../templates/ipa-pop-up-3.cfm?ID="+NAME+"&String1="+temp4;
			var hWnd = window.open(url,"","width=100,height=380,resizable=yes,status=no,toolbar=no, menubar=no,scrollbars=yes,top=250, left=250");
			if ((document.window != null) && (!hWnd.opener))
			hWnd.opener = document.window;
			return false
	}
//Assite Biaomin to input chinese pinyin
	function Get_Pin_Yin(NAME){ 
		    var temp1 = (eval("document.form1."+NAME+".value")).length-1;
			var temp4 = (eval("document.form1."+NAME+".value")).charAt(temp1);
			var url = "../../../templates/ipa-pop-up-4.cfm?ID="+NAME+"&String1="+temp4;
			var hWnd = window.open(url,"","width=280,height=100,resizable=no,toolbar=no,status=no,scrollbars=no,menubar=no,top=250, left=250");
			if ((document.window != null) && (!hWnd.opener))
			hWnd.opener = document.window;
			return false
	}
		
	function GetProfileIPA(kcode){	
		var charnumber = document.form1.charnumber.value;
		var lang = document.form1.lang.value;
		var tempid = document.form1.userid.value;
		var url = "../../../templates/ipa-pop-up-6.cfm?ID="+kcode+"&NUMBER="+charnumber+"&LANG="+lang+"&USERID="+tempid;
		if(charnumber<=25){
		var tempwidth = 320;
		var tempheight = 140 + (Math.floor((charnumber-1)/5))*40;}
		else{
		var tempwidth =500;
		var tempheight = 140 + (Math.floor((charnumber-1)/10))*35;
		}
		
		var hWnd = window.open(url,"","width="+tempwidth+",height="+tempheight+",left=250,screenx=40,top=210,screeny=20,resizable=no,scrollbars=no,status=no,toolbar=no, menubar=no");
			if ((document.window != null) && (!hWnd.opener))
			hWnd.opener = document.window;
   	}

