	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;
	}
    
//Open a big window for articles
    function openWindow(URL) {
    
        try {
                    popup_window.close();
                } catch(e) {
                            
                }
                
        popup_window=window.open( URL,"articles","status=no,location=no,menubar=no,toolbar=no,directories=no,resizable=yes,scrollbars=yes,width=800,height=540,top=0,left=200");
        window.onerror = null;
    
    }
 //Linking to external resources
    
     function openWindowExt(URL) {
        
            try {
                        popup_window.close();
                    } catch(e) {
                                
                    }
                    
            popup_window=window.open( URL,"external","status=no,location=no,menubar=no,toolbar=no,directories=no,resizable=yes,scrollbars=yes,width=750,height=490,top=0,left=250");
            window.onerror = null;
        
    }

	function loadIndexProperties() {

		var formArea = document.getElementById("formArea").offsetHeight;
		var copyArea = document.getElementById("copyArea").offsetHeight;      
      
        var copyRegionHeight =  copyArea>formArea-140 ? copyArea:formArea-140  ;   
        
  		document.getElementById("copyArea").style.height=copyRegionHeight;

		document.getElementById("formShadow").style.height=formArea-135;
        
        document.getElementById("container").style.height=copyRegionHeight+350;
        document.getElementById("copyrightArea").style.top=copyRegionHeight+270-34;


		document.getElementById("franchisor-link").style.top=formArea+155;
 
 		
                                             
	}

    function loadPrequalProperties() {
    
            var formArea = document.getElementById("formArea").offsetHeight;
            var copyArea = document.getElementById("copyArea").offsetHeight;      
          
            var copyRegionHeight =  copyArea>formArea-140 ? copyArea:formArea-140  ;   
            
            document.getElementById("copyArea").style.height=copyRegionHeight;
    
            document.getElementById("formShadow").style.height=formArea-135;
            
            document.getElementById("container").style.height=copyRegionHeight+350;
            document.getElementById("copyrightArea").style.top=copyRegionHeight+270-34;     
            
                                                 
    }

	function loadFormProperties() {

       
 		var formArea = document.getElementById("formAreaMain").offsetHeight;
        var copyArea = document.getElementById("copyArea").offsetHeight;
        var copyRegionHeight =  copyArea>formArea? copyArea:formArea;                

        
        document.getElementById("copyArea").style.height=copyRegionHeight;

		document.getElementById("formShadow").style.height=formArea-135;
        document.getElementById("copyrightArea").style.top=copyRegionHeight+235;
        document.getElementById("container").style.height=copyRegionHeight+500;
        document.getElementById("left_shade").style.height=copyRegionHeight+325-38;
        document.getElementById("right_shade").style.height=copyRegionHeight+325-38;


                                             
	}
	
	function loadNonFormProperties() {
	
	       var nfcopyArea = document.getElementById("nfcopyArea").offsetHeight;
           var nfcopyAreaContent = document.getElementById("nonFormContent").offsetHeight;
           
           document.getElementById("nfcopyArea").style.height= nfcopyAreaContent+200;

	     document.getElementById("copyrightArea").style.top=nfcopyAreaContent+280;
	     document.getElementById("left_shade").style.height=nfcopyAreaContent+330;
	     document.getElementById("right_shade").style.height=nfcopyAreaContent+330;
          
	
	}
	
	function loadArticleProperties(){
	
       
       var articlemain = document.getElementById("article-main").offsetHeight;
       
       
       if (articlemain< 630){
	     document.getElementById("nfcopyArea").style.height=830;

       }
       else {

           document.getElementById("nfcopyArea").style.height=articlemain+280;
                

         }
    
     var nfcopyarea =  document.getElementById("nfcopyArea").offsetHeight;

     document.getElementById("copyrightArea").style.top=nfcopyarea +80;
     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;
 	}

//-->
