	function SPonChange()
	{
	    document.form.CN.value = document.form.SP.value.substring(0,2);
	}


//Open a new window 
    function openNewWindow( URL ) {
        
        try {
            popup_window.close();
        } catch(e) {
                    
        }
        
        popup_window=window.open( URL,"_popover","status=no,location=no,menubar=no,toolbar=no,directories=no,resizable=yes,scrollbars=yes,width=480,height=420,top=0,left=500");
        window.onerror = null;
    }

	function loadIndexProperties() {

		/*var formArea = document.getElementById("formArea").offsetHeight;
		var copyArea = document.getElementById("copyArea").offsetHeight;         
		var copyRegionHeight = formArea > copyArea ? formArea : copyArea+50;                
  		document.getElementById("copyArea").style.height=copyRegionHeight;*/
  		var formArea = document.getElementById("formArea").offsetHeight;
		document.getElementById("formShadow").style.height=formArea-135;

 		
                                             
	}

	function loadFormProperties() {

                     /*   var formArea = document.getElementById("formAreaMain").offsetHeight;
                        var copyArea = document.getElementById("copyArea").offsetHeight;
		var copyRegionHeight = formArea > copyArea ? formArea : copyArea+50;                
       
 		document.getElementById("copyArea").style.height=copyRegionHeight;*/
 		var formArea = document.getElementById("formAreaMain").offsetHeight;
		document.getElementById("formShadow").style.height=formArea-135;
                                             
	}
	
	function loadNonFormProperties() {
	
	       var nfcopyArea = document.getElementById("nfcopyArea").offsetHeight;
	 
	       if (nfcopyArea < 630){
	             document.getElementById("nfcopyArea").style.height=630;
	             
	       }
	       else {         
	     
	     	 document.getElementById("copyrightArea").style.top=nfcopyArea+50;
	      	 document.getElementById("left_shade").style.height=nfcopyArea+130;
	      	document.getElementById("right_shade").style.height=nfcopyArea+130;
               }
	
	}
	
	function loadArticleProperties(){
	
       var nfcopyArea = document.getElementById("nfcopyArea").offsetHeight;
       var articlemain = document.getElementById("article-main").offsetHeight;
       
       
       if (nfcopyArea < 630){
	     document.getElementById("nfcopyArea").style.height=630;

       }
       else {

         if (articlemain > nfcopyArea){
           document.getElementById("nfcopyArea").style.height=articlemain+200;
           
         
            nfcopyArea=articlemain+200;
         }

	 document.getElementById("copyrightArea").style.top=nfcopyArea+50;
	 document.getElementById("left_shade").style.height=nfcopyArea+130;
	document.getElementById("right_shade").style.height=nfcopyArea+130;
  
		
	}
	
	}
	
        
 	function doProcessing() {
 		document.getElementById('submit_button').className = 'thide'; 	
  		document.getElementById('processing').className = 'tshow';
  		if (document.getElementById("formArea")!= null){
  		var formArea = document.getElementById("formArea").offsetHeight;
		document.getElementById("formShadow").style.height=formArea-136;
		}
		if (document.getElementById("formAreaMain")!= null){
		var formAreaMain = document.getElementById("formAreaMain").offsetHeight;
		document.getElementById("formShadow").style.height=formAreaMain-136;
		}
	}

	function goToMainForm() {
		document.form.submit();
		return false;
 	}

//-->