﻿<!-- 
var bReviewersWin = false;
	
var ReviewersWindow = -1;

// 開啟特殊符號視窗					
function popupReviewers(name) {        

    var ht;
    if(window.navigator.appVersion.indexOf("MSIE 5.01") == -1)
        ht = 800;
    else
        ht = 800;
	ReviewersWindow = window.open (
		name, "Reviewers",
		"resizable=yes,scrollbars=yes,height=" + ht + ",width=900,dependent=yes,alwaysRaised=yes"
	);
	bReviewersWin = true;
	ReviewersWindow.focus();
}

// 開啟新視窗的javascript
function openWindow(url,width,height) {	
	popupWin = window.open(url,'','width=' + width + ',height=' + height + ',scrollbars=yes,resizable')
}

// 檢查IE版本
function checkIE() {
	if(window.navigator.appVersion.indexOf("MSIE 5.01") > 0) {
		document.write("<table>\n");
		document.write("    <tr>\n");
		document.write("         <td valign=\"TOP\">\n");
		document.write("	          <font color=\"red\">*</font>\n");
		document.write("         </td>\n");
		document.write("         <td><font size=\"2\" face=\"arial,helvetica,sans-serif\" color=\"#333366\">Due to the version of Internet Explorer you are using, all special characters will be appended\n");
		document.write("             to the end of the related text area.  If you want the special character to be placed in the middle of the text, click the special character in this window, then cut and paste the character \n");
		document.write("             in the text area to the position you want.  We recommend that you upgrade to the latest version of Internet Explorer.\n");
		document.write("         </td>\n");
        document.write("    </tr>\n");
        document.write("    <tr>\n");
		document.write("         <td></td>\n");
		document.write("         <td><font size=\"2\" face=\"arial,helvetica,sans-serif\" color=\"#333366\">\n");
		document.write("               <center>Click <a href=\"http://www.microsoft.com/downloads/search.asp?\">\n");
        document.write("              http://www.microsoft.com/downloads/search.asp</a> to download.\n");
        document.write("    </tr>\n");
        document.write("</table>\n");
		document.write("<br />\n<br />\n");
	}
}

// 檢查解析度
function checkDisplay() {
	var c, cv=16;  
	
	if(cv!="Netscape")c=screen.colorDepth; else c=screen.pixelDepth; 

	var cs=c; 
	if(c==4)cs="4 位元 16 色"; 
	if(c==8)cs="8 位元 256 色"; 
	if(c==16)cs="16 位元高彩"; 
	if(c>16)cs=cs+" 位元全彩"; 
	if(c<cv); 
		document.write("您的螢幕色彩度是 "+cs);  
	if(c<cv) 
		document.write("，麻煩您請調高您的色彩度。"); 
	else 
		document.write("，符合網路上最佳瀏覽環境。"); 
		document.write('<br>')
		document.write('<font color="#0000FF">')

	var s=1024;  

	if(screen.width!=s); 
		document.write("您的螢幕解析度是 "+screen.width+" * "+screen.height); 
	if(screen.width!=s) 
		 document.write("，並非最佳解析度，建議您更換解析度。"); 
	else document.write("，符合本站最佳瀏覽環境。"); 
		 document.write('</font></center>')
}

// 插入特殊符號
	//----------------------------------------------------------------------------------------
	// The following client side functions are used to insert 
	// special characters into form text entry fields.
	//
	// All <INPUT TYPE=\"TEXT\"> and <TEXTAREA> tags must include the following event handlers:
	//
	//		onFocus="lastFocus=this"
	//		onSelect="storeCaret(this);"
	//		onClick="storeCaret(this);"
	//		onKeyUp="storeCaret(this);"
	//
	//----------------------------------------------------------------------------------------
	
	var bSpCharWin = false;
	
	var specialCharsWindow = -1;

// 開啟特殊符號視窗						
	function popupSpecialCharacters() {        

        var name = "./special_characters.html";
	    var ht;
	    if(window.navigator.appVersion.indexOf("MSIE 5.01") == -1)
	        ht = 350;
	    else
	        ht = 650;
		specialCharsWindow = window.open (
			name, "special_characters",
			"resizable=yes,scrollbars=yes,height=" + ht + ",width=800,dependent=yes,alwaysRaised=yes"
		);
		bSpCharWin = true;
		specialCharsWindow.focus();
	}

// 關閉特殊符號視窗
// <input type="button" value="Close" onClick="opener.closeSpecialCharacters(true)">

	function closeSpecialCharacters(doFocus) {
		var bWinNet4 = false; // boolean which indicates whether or not the browser is 
							  // Netscape 4.x and above until 6.x on Windows
		var bMacNet4 = false; // boolean which indicates whether or not the browser is 
							  // Netscape 4.x and above until 6.x on Mac
		
		// check if browser is Netscape 4.x and above until 6.x on Windows
		bWinNet4 = isBrowserWinNet4();
	
		// check if browser is Netscape 4.x and above until 6.x on Mac
		bMacNet4 = isBrowserMacNet4();

		// close the special character palette
		if (bSpCharWin)
			specialCharsWindow.close();
			
		bSpCharWin = false;
		
		if ( (!bWinNet4) && (!bMacNet4) && doFocus ) {
			if (lastFocus != null)
				lastFocus.focus();
		}
	}

	var lastFocus = null ;
	var selectedRange	 = null ;
	
	function storeCaret (textEl) {
	    if(window.navigator.appVersion.indexOf("MSIE 5.01") == -1){
		    if (textEl.createTextRange) { 
				selectedRange = document.selection.createRange().duplicate();
			}
	    }
	}

	function insertAtCaret (textEl, text) {
		// replace the unicode characters which can not be displayed properly by place holders
		text = replaceUniCharByPlaceHolder(text);
		
		if (textEl.createTextRange && selectedRange) {
			var caretPos = selectedRange;
			caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
		}
		else
			textEl.value  += text;
	}
	
	function insert_text(str){
		opener.insert(str);
	}

	function insert(insertStr){   
		if (lastFocus){
			insertAtCaret(lastFocus, insertStr);
			if(window.navigator.appVersion.indexOf("MSIE 5.01") > -1){
				popupSpecialCharacters();
			}
		}
	}
	
// 
	var gUnCharsNotDispProp = new Array(); // speical unicode characters that can not       
									       // be displayed properly on some browsers             
									      
	var gPlaceHolders = new Array();   // placeholder names for the special unicode 
					        		   // characters in the gUnCharsNotDispProp
	
	// populate the array with the hexadecimal numbers for unicode
	// characters that can not be displayed properly on some browsers
	gUnCharsNotDispProp[0]  = "03B1"  // greek small letter alpha     
	gUnCharsNotDispProp[1]  = "0391"  // greek capital letter alpha  
	gUnCharsNotDispProp[2]  = "03B2"  // greek small letter beta     
	gUnCharsNotDispProp[3]  = "0392"  // greek capital letter beta   
	gUnCharsNotDispProp[4]  = "03B3"  // greek small letter gamma    
	gUnCharsNotDispProp[5]  = "0393"  // greek capital letter gamma  
	gUnCharsNotDispProp[6]  = "03B4"  // greek small letter delta    
	gUnCharsNotDispProp[7]  = "0394"  // greek capital letter delta  
	gUnCharsNotDispProp[8]  = "03B5"  // greek small letter epsilon  
	gUnCharsNotDispProp[9]  = "0395"  // greek capital letter epsilon
	gUnCharsNotDispProp[10] = "03B6"  // greek small letter zeta     
	gUnCharsNotDispProp[11] = "0396"  // greek capital letter zeta   
	gUnCharsNotDispProp[12] = "03B7"  // greek small letter eta      
	gUnCharsNotDispProp[13] = "0397"  // greek capital letter eta    
	gUnCharsNotDispProp[14] = "03B8"  // greek small letter theta    
	gUnCharsNotDispProp[15] = "0398"  // greek capital letter theta  
	gUnCharsNotDispProp[16] = "03B9"  // greek small letter iota     
	gUnCharsNotDispProp[17] = "0399"  // greek capital letter iota   
	gUnCharsNotDispProp[18] = "03BA"  // greek small letter kappa    
	gUnCharsNotDispProp[19] = "039A"  // greek capital letter kappa  
	gUnCharsNotDispProp[20] = "03BB"  // greek small letter lambda   
	gUnCharsNotDispProp[21] = "039B"  // greek capital letter lambda 
	gUnCharsNotDispProp[22] = "03BC"  // greek small letter mu       
	gUnCharsNotDispProp[23] = "039C"  // greek capital letter mu     
	gUnCharsNotDispProp[24] = "03BD"  // greek small letter nu       
	gUnCharsNotDispProp[25] = "039D"  // greek capital letter nu     
	gUnCharsNotDispProp[26] = "03BE"  // greek small letter xi       
	gUnCharsNotDispProp[27] = "039E"  // greek capital letter xi     
	gUnCharsNotDispProp[28] = "03BF"  // greek small letter omicron  
	gUnCharsNotDispProp[29] = "039F"  // greek capital letter omicron
	gUnCharsNotDispProp[30] = "03C0"  // greek small letter pi       
	gUnCharsNotDispProp[31] = "03A0"  // greek capital letter pi     
	gUnCharsNotDispProp[32] = "03C1"  // greek small letter rho      
	gUnCharsNotDispProp[33] = "03A1"  // greek capital letter rho    
	gUnCharsNotDispProp[34] = "03C3"  // greek small letter sigma    
	gUnCharsNotDispProp[35] = "03A3"  // greek capital letter sigma  
	gUnCharsNotDispProp[36] = "03C4"  // greek small letter tau      
	gUnCharsNotDispProp[37] = "03A4"  // greek capital letter tau    
	gUnCharsNotDispProp[38] = "03C5"  // greek small letter upsilon  
	gUnCharsNotDispProp[39] = "03A5"  // greek capital letter upsilon
	gUnCharsNotDispProp[40] = "03C6"  // greek small letter phi      
	gUnCharsNotDispProp[41] = "03A6"  // greek capital letter phi    
	gUnCharsNotDispProp[42] = "03C7"  // greek small letter chi      
	gUnCharsNotDispProp[43] = "03A7"  // greek capital letter chi    
	gUnCharsNotDispProp[44] = "03C8"  // greek small letter psi      
	gUnCharsNotDispProp[45] = "03A8"  // greek capital letter psi    
	gUnCharsNotDispProp[46] = "03C9"  // greek small letter omega    
	gUnCharsNotDispProp[47] = "03A9"  // greek capital letter omega  
	
	// popluate the array with the place holder names corresponsing 
	// to the unicode characters in the gUnCharsNotDispProp array
	gPlaceHolders[0]  = "alpha";
	gPlaceHolders[1]  = "ALPHA";
	gPlaceHolders[2]  = "beta";
	gPlaceHolders[3]  = "BETA";
	gPlaceHolders[4]  = "gamma";
	gPlaceHolders[5]  = "GAMMA";
	gPlaceHolders[6]  = "delta";
	gPlaceHolders[7]  = "DELTA";
	gPlaceHolders[8]  = "epsilon";
	gPlaceHolders[9]  = "EPSILON";
	gPlaceHolders[10] = "zeta"; 
	gPlaceHolders[11] = "ZETA"; 
	gPlaceHolders[12] = "eta";
	gPlaceHolders[13] = "ETA";
	gPlaceHolders[14] = "theta";
	gPlaceHolders[15] = "THETA";
	gPlaceHolders[16] = "iota";
	gPlaceHolders[17] = "IOTA";
	gPlaceHolders[18] = "kappa";
	gPlaceHolders[19] = "KAPPA";
	gPlaceHolders[20] = "lambda";
	gPlaceHolders[21] = "LAMBDA";
	gPlaceHolders[22] = "mu";
	gPlaceHolders[23] = "MU";
	gPlaceHolders[24] = "nu";
	gPlaceHolders[25] = "NU";
	gPlaceHolders[26] = "xi";
	gPlaceHolders[27] = "XI";
	gPlaceHolders[28] = "omicron";
	gPlaceHolders[29] = "OMICRON";
	gPlaceHolders[30] = "pi";
	gPlaceHolders[31] = "PI";
	gPlaceHolders[32] = "rho";
	gPlaceHolders[33] = "RHO";
	gPlaceHolders[34] = "sigma";
	gPlaceHolders[35] = "SIGMA";
	gPlaceHolders[36] = "tau";
	gPlaceHolders[37] = "TAU";
	gPlaceHolders[38] = "upsilon";
	gPlaceHolders[39] = "UPSILON";
	gPlaceHolders[40] = "phi";
	gPlaceHolders[41] = "PHI";
	gPlaceHolders[42] = "chi";
	gPlaceHolders[43] = "CHI";
	gPlaceHolders[44] = "psi";
	gPlaceHolders[45] = "PSI";
	gPlaceHolders[46] = "omega";
	gPlaceHolders[47] = "OMEGA";
	
	function getBrowserTypeVerPlat() {            
		var browserInfo = new Array(); // array containing browser info. to be returned 
		
		var browserName = "";	 // name of the browser used by the user
		var browserVer  = "";	 // version of the browser used by the user
		var usrPlatform = "";	 // platform being used by the user
		var usrAgent    = ""; 	 // value of the user agent within the header sent in the HTTP
								 // protocol from client to server
		var usrBrowserVer = "" ; // string returned by navigator.appVersion
		
		browserName += window.navigator.appName;  // get the browser name
		usrPlatform += window.navigator.platform; // get the user platform
					
		usrAgent      += window.navigator.userAgent;  // get the user agent header value
		usrBrowserVer += window.navigator.appVersion; // get the browser version
		
		if ( browserName.indexOf("Microsoft Internet Explorer") != -1 ) {             
			var usrAgentSubStr = "";		// the string between ( ) in usrAgent string
			var usrAgentArr = new Array();	// the array returned by splitting the usrAgentSubStr with ; delimiter
			var browserVerInfo = "";		// the string MSIE ver_number (e.g MSIE 6.0) in the usrAgentSubStr
			var verNumStartIndex = 5;		// start index of ver_number in the browserInfo string
			var verNumEndIndex;				// end index of ver_number in the browserInfo string (length of browserInfo)
			var startIndex = usrAgent.indexOf("("); // index of ( in usrAgent string
			var endIndex   = usrAgent.indexOf(")");	// index of ) in usrAgent string
			
			// assign MSIE to browserName to be consitent
			browserName = "MSIE";
			// get the string between ( ) in usrAgent
			usrAgentSubStr += usrAgent.substring(startIndex+1, endIndex);	
			// split the usrAgentSubStr with ; delimiter
			usrAgentArr = usrAgentSubStr.split(";");
			// get the string MSIE ver_number (e.g MSIE 6.0) from the usrAgentArr
			browserVerInfo += usrAgentArr[1];
			// end index of ver_number in the browserInfo string
			verNumEndIndex = browserVerInfo.length;
			// get the version number
			browserVer += browserVerInfo.substring(verNumStartIndex, verNumEndIndex);
		}
		
		
		if ( browserName.indexOf("Netscape") != -1 ) {	
			// for Netscape 6 the usrAgent contains the string Netscape6
			if (usrAgent.indexOf("Netscape6") != -1) {
				// if we are here, then it must be Netscape 6
				var browserType = "Netscape6";
				var verNumStartIndex = usrAgent.indexOf("Netscape6") + (browserType.length) + 1; // start index for ver_number
				var verNumEndIndex = usrAgent.length; // end index for ver_number
				
				// get the version number
				browserVer += usrAgent.substring(verNumStartIndex, verNumEndIndex);	
			}
			// for Netscape 7 the usrAgent contains the string Netscape
			else if (usrAgent.indexOf("Netscape") != -1) {
				var browserType = "Netscape";
				var verNumStartIndex = usrAgent.indexOf("Netscape") + (browserType.length) + 1; // start index for ver_number
				var verNumEndIndex = usrAgent.length; // end index for ver_number
				
				// get the version number
				browserVer += usrAgent.substring(verNumStartIndex, verNumEndIndex);				
			}
			// if the userAgent neither contains Netscape nor Netscape, than we can 
			// confirm that it must be Netscape 4.7
			else {
				var verNumStartIndex = 0; // start index for ver_number
				var index = 5;			  // index of ( or [ in usrBrowserVer string
				var verNumEndIndex = index - 1;    // end index for ver_number
				
				// get the version number
				browserVer += usrBrowserVer.substring(verNumStartIndex, verNumEndIndex);	
			}
		}
		
		if (usrPlatform.indexOf("Win") != -1)
			usrPlatform = "Win";
		else if (usrPlatform.indexOf("Mac") != -1)
			usrPlatform = "Mac";
			
		browserInfo[0] = browserName;
		browserInfo[1] = browserVer; 
		browserInfo[2] = usrPlatform;
	
		return browserInfo;
	}	
	
	function replaceUniCharByPlaceHolder(text) {
		var versions4   = 4.0;		   // browser version 4.0
		var versions5	= 5.0;		   // browser version 5.0
		var versions6   = 6.0;		   // browser version 6.0
		var browserInfo = new Array(); // array retunred by function getBrowserTypeVerPlat()
		var browserName = "";		   // name of the browser used by the user
 		var browserVer  = "";		   // version of the browser used by the user
		var usrPlatform = "";		   // platform being used by the user
		var ver;					   // float number representing browser version converted from string
		
		// get the browser name, version, and user platform
		browserInfo  = getBrowserTypeVerPlat(); 
		browserName += browserInfo[0];
		browserVer  += browserInfo[1];
		usrPlatform += browserInfo[2];
		
		// convert the browser version string into float number for comparision
		ver = parseFloat(browserVer);
			
		if (usrPlatform.indexOf("Win") != -1) {
			if (browserName.indexOf("Netscape") != -1) {
				
				if ((ver >= versions4) && (ver < versions6)) {
					//get place holder here
					for (var i = 0; i < gUnCharsNotDispProp.length; i++) {
						if (text == gUnCharsNotDispProp[i] ) {
							text = "\u003C" + gPlaceHolders[i] + "\u003E"; 
							break;
						}
					}
				}
			}
		}
		else if (usrPlatform.indexOf("Mac") != -1) {
			if (browserName.indexOf("MSIE") != -1) {
				
				if ( ver >= versions5 )	{
					
					var superscript2 = "\u00B2"; 
					var superscript3 = "\u00B3"; 
					var superscript1 = "\u00B9"; 
					
					if (text == superscript2)
						text = "<sup2>";
					else if (text == superscript3)
						text = "<sup3>";
					else if (text == superscript1)
						text = "<sup1>";
					else {
						// get place holder here
						for (var i = 0; i < gUnCharsNotDispProp.length; i++) {
							if (text == gUnCharsNotDispProp[i])	{
								text = "\u003C" + gPlaceHolders[i] + "\u003E"; 
								break;
							}
						}
					}
				}
			}
			else if (browserName.indexOf("Netscape") != -1) {				
				if ( (ver >= versions4)  && (ver < versions6) ) {	
					var mul = "\u00D7"; 
					
					if (text == mul)
						text = "<times>";
					else 	{
						for (var i = 0; i < gUnCharsNotDispProp.length; i++) {
							if (text == gUnCharsNotDispProp[i])	{
								text = "\u003C" + gPlaceHolders[i] + "\u003E"; 
								break;
							}
						}
					}
				}	
			}
		}
		return text;
	}
	
	var gBrowserInfo = new Array(); // browser info. returned by getBrowserTypeVerPlat() function
	var gBrowserName = "";		    // name of the browser used by the user
 	var gBrowserVer  = "";		    // version of the browser used by the user
	var gUsrPlatform = "";		    // platform being used by the user
	var gVer;					    // float number representing browser version converted from string
	var gVersions4   = 4.0;		    // browser version 4.0
	var gVersions5	 = 5.0;		    // browser version 5.0
	var gVersions6   = 6.0;		    // browser version 6.0
	
	// get the browser name, version, and user platform
	gBrowserInfo  = getBrowserTypeVerPlat(); 
	gBrowserName += gBrowserInfo[0];
	gBrowserVer  += gBrowserInfo[1];
	gUsrPlatform += gBrowserInfo[2];
	
	// convert the browser version string into float number for comparision
	gVer = parseFloat(gBrowserVer);
	
	function isBrowserWinNet4()	{
		if (gUsrPlatform.indexOf("Win") != -1)	{
			if (gBrowserName.indexOf("Netscape") != -1)	{
				// if Netscape version 4.x and above until 6.x, then return true
				if ( (gVer >= gVersions4)  && (gVer < gVersions6) )
					return true;
			}
		}
		return false;
	}
	
	function isBrowserMacIE5() {		
		if (gUsrPlatform.indexOf("Mac") != -1)	{
			if (gBrowserName.indexOf("MSIE") != -1)	{
				// if IE version 5.x and above, return true
				if ( gVer >= gVersions5 )
					return true;
			}
		}
		return false;
	}
		
	function isBrowserMacNet4() {
		if (gUsrPlatform.indexOf("Mac") != -1) {
			if (gBrowserName.indexOf("Netscape") != -1)	{
				if ( (gVer >= gVersions4)  && (gVer < gVersions6) )
					return true;
			}
		}
		return false;
	}

// 檢查選擇的選項
function showCustomHint(a){

   if(a.PasswdHintForm.value=="999"){
        wjchiou123.style.visibility = "visible";
	wjchiou123.style.display = "";

   }else{
        wjchiou123.style.visibility = "hidden";
        wjchiou123.style.display = "none";
        a.CustomHint.value="";
   }
}

// 線上列印
function printer() {

    if (!window.print){
        alert("請使用 Netscape 4.x 以上版本瀏覽器列印本表單\n\n不符合上述規定麻煩請按瀏覽器上方列印按鈕，謝謝！")
        return
    }
    window.print()
}
// 請直接列印本表填寫！<A href="javascript:printer()"><IMG border=0 src="./images/print.gif"></A></FONT>


// 檢查輸入的資料
function checkInput(frm, mask){
	var FrmLen = frm.elements.length;
	var maskarr = mask;
	for (var i = 0; i < FrmLen; i++){
		maskarr = mask.substring(i,i+1)
		var valdate = 1;
		var valtext = 1;
		var valselect = 1;
		var valnum = 1;
		var valtelenum = 1;
		var valpasswd = 1;
		var valemail = 1;
		if (maskarr == "x" || maskarr == "X"){
			valtext = true;
		}
		if (maskarr == "t" || maskarr == "T"){
			valtext = checkText(frm.elements[i].value);
		}
		if (maskarr == "s" || maskarr == "S"){
			valselect = checkSelect(frm.elements[i].value);
		}
		if (maskarr == "n" || maskarr == "N")	{
			valnum = checkNum(frm.elements[i].value);
		}
		if (maskarr == "p" || maskarr == "P")	{
			valpasswd = checkPasswd(frm.elements[i].value);
		}
		if (maskarr == "e" || maskarr == "E")	{
			valemail = checkEmail(frm.elements[i].value);
		}

		if (! valnum)	{
			alert("Your input data is not completed or invalid!");
			Focus(frm.elements[i]);
			return false;
		}
		if (! valtext)	{
			alert("Your input data is not completed or invalid!");
			Focus(frm.elements[i]);
			return false;
		}
		if (! valselect)	{
			alert("Your input data is not completed or invalid!");
			Focus(frm.elements[i]);
			return false;
		}
		if (! valpasswd)	{
			alert("Your password is not completed or invalid!");
			Focus(frm.elements[i]);
			return false;
		}
		if (! valemail)	{
			alert("Your E-mail address is not completed or invalid!");
			Focus(frm.elements[i]);
			return false;
		}
	}
	return true;
}

//文字格式檢查
function checkText(s){
	if (s.length > 0){
		return true;
	}
	return false;
}

//選擇格式檢查
function checkSelect(s){
	if (s.length > 0){
		return true;
	}
	return false;
}

//數字格式檢查
function checkNum(s){
	if (parseInt(s) > 0){
		return true;
	}
	return false;
}

//密碼檢查
function checkPasswd(s){
	if (s.length > 0 ){
		return true;
	}
	return false;
}

//E-Mail格式檢查
function checkEmail(s){
	if (s.length > 0){
		if (s.indexOf ('@',0) == -1 || s.indexOf ('.',0) == -1){
			return false;
		}
		return true;
	}
	return false;
}

  function Focus(elementStr){
   elementStr.value="";
   elementStr.focus();
  }

  function reloadmain(p1) {
    parent.mainFrame.location.href=p1;
  }
  function reload(p1,p2,p3) {
    parent.topFrame.location.href=p1;
    parent.leftFrame.location.href=p2;
    parent.mainFrame.location.href=p3;
  }

  function CheckData(){
    if(Login.account.value==""){
       window.alert("Please input your account!");
       Login.account.focus();
    }
    else if(Login.password.value==""){
       window.alert("Please input your password!");
       Login.password.focus();
    }
    else Login.submit();
  } 
  
  function CheckInputData(){

    if(addmember.Account.value==""){
       window.alert("Please input your account!");
       addmember.Account.focus();
    }
    else if(addmember.Password.value==""){
       window.alert("Please input your password!");
       addmember.Password.focus();
    }
    else if(addmember.Password2.value==""){
       window.alert("Please retype your password!");
       addmember.Password2.focus();
    }
    else if(addmember.Password.value!=addmember.Password2.value){
       window.alert("Please check your password!");
       addmember.Password2.focus();
    }
    else if(addmember.Name.value==""){
       window.alert("Please input your name!");
       addmember.Name.focus();
    }
    else if(addmember.Country.value==""){
       window.alert("Please select your country!");
       addmember.Country.focus();
    }
    else if(addmember.Occupation.value==""){
       window.alert("Please select your occupation!");
       addmember.Occupation.focus();
    }    
    else if(addmember.Educational.value==""){
       window.alert("Please select your highest educational level!");
       addmember.Educational.focus();
    }        
    else if(addmember.Email.value==""){
       window.alert("Please input your E-mail address!");
       addmember.Email.focus();
    }
    else if(addmember.Email.value.indexOf('@')==-1){
       window.alert("E-mail帳號中必需有'@'!!");
       addmember.Email.focus();
    }        
    else addmember.submit();
  } 

  function setValue(str1) {
	document.paper.journal.value = str1;
  }

  function setEmails(frm, str1, str2) {
	if (str2.length > 0){
		if (str1.indexOf(str2, 0) == -1){
			frm.email.value = str1+str2+";";
		}
	}
  }

  function reloadmain(p1) {
     parent.mainFrame.location.href=p1;
  }
  
  function reload(p1,p2,p3) {
     parent.topFrame.location.href=p1;
     parent.leftFrame.location.href=p2;
     parent.mainFrame.location.href=p3;
  }
  
  function Confirms(str1){
	if( confirm(str1)){
		return true;
	}
	return false;
  }

  function ConfirmFrm(frm, str1){
	if( confirm(str1)){
		frm.submit();
		return true;
	}
	return false;
  }
//-->
