<!--

	function popwindow() {
		ForgotPasswordWindow = window.open ('', 'ForgotPasswordWindow', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,height=250,width=550')
		ForgotPasswordWindow.focus()
		ForgotPasswordWindow.location.href = '21months.htm'
	}

	function launchNotepad() {
		page = "/notepad/frm_notepad.asp";
		window.open(page, "notepad", "resizable=yes,scrollbars=yes,toolbar=no,location=no,menu=no,width=616,height=600");
	}
	
	var timerWin;
	function openTimer(inURL) {
		timerWin = window.open(inURL, "timerWinName", "height=100,width=200,menubar=0,resizable=1,toolbar=0,location=0,scrollbars=0")
		// set a cookie to note that the window is open
		document.cookie = "timerLoaded=yes; path=/";
		timerWin.focus()
	}
	
	
	function errOff() {
			//alert('a');
			document.getElementById('signintaberror').style.display='none';
			//alert('b');
			return false;
		}
		
		function errMsg() {
			//alert("Welcome to Trade Law Guide. Please sign up as a member, then securely login to access these features of the system.");
			//alert('1');
			//document.getElementById('signintaberror').style.display='';
			//setTimeout("errOff()",6000)
			showLoadingWin('Please sign up as a member', '', 'errMsg', '300px', '80px');
			//alert('2');
			return false;
		}
		
		function getRef(obj){
        return (typeof obj == "string") ?
        document.getElementById(obj) : obj;
		}

		//OVERRIDES PREVIOUS VARIABLE SET IN HEADER
		var toolName = "default";
		
		
		function setCookiePage(c_name,value1,isParentStorage)
		{
			var objhold,obj;
			c_name = c_name + '_ck_fake';

			//alert('1: '+isParentStorage);

			if ( isParentStorage == true ) {
				objhold = parent.document.getElementById('spancookieholder');
				if ( !objhold ) {
					objhold = window.opener.document.getElementById('spancookieholder');
				}
				//alert('2: '+objhold);				
				if ( !objhold ) {
					return false;
				}
				obj = parent.document.getElementById(c_name);
				if ( !obj ) {
					obj = window.opener.document.getElementById(c_name);
				}
				
			} else {
				
				objhold = window.document.getElementById('spancookieholder');
				//alert('2: '+objhold);				
				if ( !objhold ) {
					return false;
				}
				obj = window.document.getElementById(c_name);
			}
			
			//alert('3: '+obj+'/'+c_name);								
			
			if ( !obj ) {
				objhold.innerHTML += '<input id="'+c_name+'" name="'+c_name+'" type="hidden" value="'+value1+'" />';
				//alert('4: '+obj);								
				//alert('5: '+value1+'/'+getCookiePage(c_name, isParentStorage));
			} else {
				obj.value = value1;
				//alert('6: '+obj);								
				//alert('7: '+value1+'/'+getCookiePage(c_name, isParentStorage));
			}
			
			return false;
		}
		
		function getCookiePage(c_name, isParentStorage)
		{
			var objhold,obj;
			
			if ( c_name.indexOf('_ck_fake') == -1 ) {
				c_name = c_name + '_ck_fake';
			}
			if ( isParentStorage == true ) {
				objhold = parent.document.getElementById('spancookieholder');
				if ( !objhold ) {
					objhold = window.opener.document.getElementById('spancookieholder');
				}
				if ( !objhold ) {
					return '';
				}
				obj = parent.document.getElementById(c_name);
				if ( !obj ) {
					obj = window.opener.document.getElementById(c_name);
				}
				if ( obj ) {
					//alert('b1: '+obj.value);					
					return obj.value;
				}
			} else {
				
				objhold = window.document.getElementById('spancookieholder');
				if ( !objhold ) {
					return '';
				}
				obj = window.document.getElementById(c_name);
				if ( obj ) {
					//alert('b1: '+obj.value);					
					return obj.value;
				}				
			}
			return '';
		}
		
		function setCookie(c_name,value,expiredays)
		{
			var exdate=new Date()
			
			//alert("2")
			exdate.setDate(exdate.getDate()+expiredays)
			
			document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString())
		}
		
		/**
		* Gets the value of the specified cookie.
		*
		* name Name of the desired cookie.
		*
		* Returns a string containing value of specified cookie,
		* or null if cookie does not exist.
		*/
		function getCookie(name) {
		var dc = document.cookie;
		var prefix = name + '=';
		var begin = dc.indexOf('; ' + prefix);
		if (begin == -1) {
		begin = dc.indexOf(prefix);
		if (begin != 0) return null;
		} else {
		begin += 2;
		}
		var end = document.cookie.indexOf(';', begin);
		if (end == -1) {
		end = dc.length;
		}
		return unescape(dc.substring(begin + prefix.length, end));
		}		
		
		function Font1() {
			setClassName('bodytextplus1','para_M2');
			setClassName('bodytext' ,'para_M2');
			setClassName('bodytext2','para_M2');
			
			try{
				document.getElementById('font1').style.display='';
				document.getElementById('font2').style.display='none';
				document.getElementById('font3').style.display='none';
			}
			catch(err){
				//in the case of popus - where there are no icons
				//alert('no icons');
			}				

			if (toolName != "") {
				setCookie('fontsize_'+toolName, "1", 2);
			}
			//return true;
		}
		function Font2() {
			setClassName('bodytextplus1','para_Reg');
			setClassName('bodytext' ,'para_Reg');
			setClassName('bodytext2','para_Reg');
						
			try{
				document.getElementById('font1').style.display='none';
				document.getElementById('font2').style.display='';
				document.getElementById('font3').style.display='none';						
			}
			catch(err){
				//in the case of popus - where there are no icons
				//alert('no icons');
			}				

			if (toolName != "") {
				setCookie('fontsize_'+toolName, "2", 2);
			}
			//return true;
		}
		function Font3() {
			setClassName('bodytextplus1','para_P4');
			setClassName('bodytext','para_P4');
			setClassName('bodytext2','para_P4');
						
			try{
				document.getElementById('font1').style.display='none';
				document.getElementById('font2').style.display='none';
				document.getElementById('font3').style.display='';						
			}
			catch(err){
				//in the case of popus - where there are no icons
				//alert('no icons');
			}				
			if (toolName != "") {
				setCookie('fontsize_'+toolName, "3", 2);
			}
			//return true;
		}

		
		function setFontSize(){
			if( getCookie('fontsize_default') == '1' ){
				Font1();
			}else if( getCookie('fontsize_default') == '3' ){
				Font3();
			}else{
				Font2();
			}
		}
		
		function setClassNameOnly(obj, className) {	
				var objref, strTemp;
	   	objref = getRef(obj);
	   	//if (objref)
	   	//	alert('1: ' + typeof(objref) + ' ' + obj);
	   		
	   	//if (typeof(objref) == "object") {
	   	//alert('0:' + obj + ' ' + className);
			if (objref) {	   		
	   		//alert('1: ' + typeof objref);
	   		objref.className = className;
	   	}	
		}
		
		function setClassName(obj, className) {	
			var tmpStr, orgClassName, temp;
			
			if(obj == 'fontsizecontainer')
			{
				var today = new Date();
				var expire = new Date();
				var loopN, endLoopN;
				
//alert('a1');
				
				expire.setTime(today.getTime() + 3600000*24*365);
 	
				document.cookie = "fontclass=" + className + ";expires=" 
					+ expire.toGMTString() + ";path=/";
			}
	   	//getRef(obj).className = className;
	   	var objref;
	   	objref = getRef(obj);
	   	//if (objref)
	   	//	alert('1: ' + typeof(objref) + ' ' + obj);
	   		
	   	//if (typeof(objref) == "object") {
	   	//alert('0:' + obj + ' ' + className);
	   	//alert('1:'+obj+'/'+objref.className);	   		   	
	   	
	   	//alert('1: ' + obj + '/' + className);
	   	
	   	orgClassName = className;
	   	if ( obj == 'bodytextplus1' ) {
	   		if ( className == 'para_M2' ) {
	   			className = 'para_M2_1';
	   		}
	   		else if ( className == 'para_Reg' ) {
	   			className = 'para_Reg_1';
	   		}
	   		else if ( className == 'para_P4' ) {
	   			className = 'para_P4_1';
	   		}
	   	}
	   	
	   	
//alert('a2');	   	

   		//alert('0: ' + obj);
   		if ( 1==1 && obj == 'bodytextplus1' ) {
   			
//alert('a3');   			

   			endLoopN = 100;
	   		for (LoopN=11; LoopN<=endLoopN; LoopN++) {
	   				temp = className;
	   				if ( LoopN <= 10 ) {
	   					temp = orgClassName;
	   				}
	   				objref = getRef(obj + '_' + LoopN);
	   				//alert('a: '+obj + '_' + LoopN);
	   				if (objref) {	
	   					//alert('123');
	   					//alert('b: '+obj + '_' + LoopN);
	   					
	   					strTemp = objref.className;
	   					
				   		if ( orgClassName.toUpperCase() == 'PARA_M2' || orgClassName.toUpperCase() == 'PARA_REG' || orgClassName.toUpperCase() == 'PARA_P4' ) {
				   				strTemp = strTemp.replace('para_M2','');
				   				strTemp = strTemp.replace('para_Reg','');
				   				strTemp = strTemp.replace('para_P4','');
				   				
				   				//alert('0: ' + objref.id + '/' + objref.className);
				   		}
				   		
				   		if ( strTemp != '' ) {
				   			strTemp = strTemp + ' ' + temp;
				   			//objref.className = temp;
				   		} else {
				   			strTemp = temp;
				   		}
				   		if ( trimstr(strTemp) != trimstr(objref.className) ) {
		   					objref.className = trimstr(strTemp);
		  				}
				   		
				   }
				   //objref.className = temp;
				   //alert('456');
				   //alert('1: ' + objref.id + '/' + objref.className);
				  				   		
			     objref = getRef('bodytext' + LoopN);
   				 //alert('0: '+obj + '_' + LoopN);
   				 if (objref) {	
   					 //alert('1: '+obj + "_" + LoopN);
   					 
   					 strTemp = objref.className;
   					 
			   		 if ( orgClassName.toUpperCase() == 'PARA_M2' || orgClassName.toUpperCase() == 'PARA_REG' || orgClassName.toUpperCase() == 'PARA_P4' ) {
			   			 	  strTemp = strTemp.replace('para_M2','');
			   				  strTemp = strTemp.replace('para_Reg','');
			   				  strTemp = strTemp.replace('para_P4','');
			   				
			   				//alert('0: ' + objref.id + '/' + objref.className);
			   		 }
			   		 if ( strTemp != '' ) {
			   			strTemp = strTemp + ' ' + orgClassName;
			   			//objref.className = temp;
			   		 } else {
			   			strTemp = orgClassName;
			   		 }
			   		 if ( trimstr(strTemp) != trimstr(objref.className) ) {
		   					objref.className = trimstr(strTemp);
		  				}
			   		 
			   		 //objref.className = temp;
			   		 //alert('2: ' + objref.id + '/' + objref.className);
			   	 }
				   	
		   	}
		   	
//alert('a4');		   	

		   	//return;
		   	
		  } else if (objref) {	   		
		   		//alert('1: ' + typeof objref);
		   		
//alert('a41:'+objref.className);

				strTemp = objref.className;
	   		if ( className.toUpperCase() == 'PARA_M2' || className.toUpperCase() == 'PARA_REG' || className.toUpperCase() == 'PARA_P4' ) {
	   				strTemp = strTemp.replace('para_M2','');
	   				strTemp = strTemp.replace('para_Reg','');
	   				strTemp = strTemp.replace('para_P4','');
//alert('a42');	   				
	   		}
	   		if ( strTemp != '' ) {
	   			strTemp = strTemp + ' ' + className;
//alert('a43');	   			
	   		} else {
	   			strTemp = className;
//alert('a44');	   			
	   		}
		   		
		    if ( trimstr(strTemp) != trimstr(objref.className) ) {
//alert('a45:'+trimstr(objref.className)+'/'+trimstr(strTemp));		    	
		   		objref.className = trimstr(strTemp);
		  	}
		  
//alert('a46:'+objref.className);		   		

	   		//alert('2: ' + objref.id + '/' + objref.className);
	   	}	
	   	
	   	//alert('2:'+obj+'/'+objref.className);	   		   	
	   	
//alert('a5');
	   	
	   	if (obj == 'bodytext' || obj == 'bodytext2') {
	   		var objrefdyn;
	   		objrefdyn = getRef('bodytextdynamic');
	   		if (objrefdyn) {	   		
	   		//alert('1: ' + typeof objref);
	   		
	   		tmpStr = objrefdyn.className;
	   		if ( tmpStr.toUpperCase().indexOf('DYNAMICAREA') >= 0 ) {
	   			objrefdyn.className = 'dynamicArea ' + className;
	   		} else {
	   			objrefdyn.className = className;
	   			//alert('1: ' + className);
	   		}
	   		}	

	   	}
	   	
	   	//alert('test:' + obj + ' ' + className );
	   	
//alert('a7');
	   	
	   	//alnkfont? are the links to increase the font size
	   	if (obj != 'alnkfont1' && obj != 'alnkfont2' && obj != 'alnkfont3' && obj != 'alnkfont4') {
	  		var objref2;
	  		var a;
		   	for (i=1; i<100; i++) {
		   		a = 'bodytext_td' + i;
		   		//alert(a);
		   		objref2 = getRef(a);
		   		/*if (a == 'bodytext_td199') {
		   			alert('1: ' + a)
		   		}	*/
		   		
		   		if (objref2) {
		   			//alert(a);
		   			/*if (a == 'bodytext_td199') {
		   				alert('2: ' + a + ' ' + className + ' ' + 'bodytext');
		   			}	*/
		   			objref2.className = className + ' ' + 'bodytext';
		   		}	
		   		
		   		//for title of tables
		   		a = 'bodytext_tdt' + i;
		   		//alert(a);
		   		objref2 = getRef(a);
		   		if (objref2) {
		   			//alert(a + ' ' + className + 'T');
		   			objref2.className = className + 'T';
		   		}	
		   		
		   		//for title of tables (2)
		   		a = 'bodytab' + i;
		   		//alert(a);
		   		objref2 = getRef(a);
		   		if (objref2) {
		   			//alert(a + ' ' + className + 'T');
		   			objref2.className = className + 'TL';
		   		}	
		   		
		   		//for links
		   		a = 'bodytext_lnk' + i;
		   		//alert(a);
		   		objref2 = getRef(a);
		   		if (objref2) {
		   			objref2.className = className + ' bodytext';
		   		}	
	   			   		
		  	}
		  }	
		  
//alert('a8');
		}

function trimstr(sString)
{
	while (sString.substring(0,1) == ' ')
	{
		sString = sString.substring(1, sString.length);
	}
	while (sString.substring(sString.length-1, sString.length) == ' ')
	{
		sString = sString.substring(0,sString.length-1);
	}
	return sString;
}
//-->
