	var constWidth = 0;
	var constHeight = 0;
	var iHeaderHeight = 0;
	var iLeftBarRight = 0;
	var iLeftBarLeft = 0;
	var iWidth  =0;
	var newWidth =0;
	var iHeight =0;
	var newHeight =0;
	var clientHeight =0;
	var LeftTableTagWidth = 0;
	var clientWidthWindow  =0;
	var MenuDiff=0;
	var scrollDiff = 19;






	function playMovie(){
		if(document.getElementById("VidChange").selectedIndex !=0){
			document.getElementById("MediaPlayer").URL =document.getElementById("VidChange").options[document.getElementById("VidChange").selectedIndex].value;
			document.getElementById("MediaPlayer").Play();
		}
	}
	
	
	function refresh(){
		//if(cookieEnabled){
		//	if(sURL.indexOf("dragndrop") != -1){
		//		if(document.all){
		//			setCookie("MediaPlayerPosition",document.getElementById("VidChange").selectedIndex);
		//		}
		//	}
		//}
		bTest = false;
		if(document.all){
			window.setTimeout("refreshTimer();", 350);

		}else{
			window.setTimeout("refreshTimer()", 350);		
		}
	}

	
	function refreshTimer(){
		window.location.reload( false );
	}

	function Maximize(){
		window.moveTo(0,0); 
		if (document.all) { 
			window.resizeTo(screen.availWidth,screen.availHeight); 
		}else{ 
			window.outerHeight = screen.availHeight; 
			window.outerWidth = screen.availWidth; 
		} 
	}

	


if(bolPrint ==false){	
	if(ReloadOnResize){
		window.onresize = refresh; 
	}else{
		window.onresize = RefreshContent; 
	}
	
	
	RefreshContent();
	
	
	
	
	
}	
	
	
	
	function AlterHeights(){
	
		if(document.all){
			iHeaderHeight  = document.all("MenuTable").offsetTop + document.all("MenuTable").offsetHeight;
		}else{
			iHeaderHeight  = document.getElementById("MenuTable").offsetTop + document.getElementById("MenuTable").offsetHeight ;
		}		
		if(document.all){
			if (is_opera ){
				constHeight =window.innerHeight-iHeaderHeight ;
			}else{
				constHeight =document.body.offsetHeight-iHeaderHeight  ;
			}
		}else{
			constHeight =window.innerHeight-iHeaderHeight ;
		}
		
		if (document.all){
			document.all("header").style.height = iHeaderHeight   + "px";
			document.all("sidebar-left").style.top= iHeaderHeight  +1  + "px";
			document.all("content").style.marginTop = iHeaderHeight +1   + "px";
			LeftImageTable.height = iHeaderHeight + "px";
			document.all("MiddleTable").height  =iHeaderHeight - document.all("MenuTable").offsetHeight + "px";
		}else{
			document.getElementById("header").style.height = iHeaderHeight   + "px";
			document.getElementById("sidebar-left").style.top= iHeaderHeight  +1  + "px";
			document.getElementById("content").style.marginTop = iHeaderHeight +1   + "px";
			document.getElementById("LeftImageTable").height = iHeaderHeight + "px";
			document.getElementById("MiddleTable").height  =iHeaderHeight - (document.getElementById("MenuTable").offsetHeight) + "px";
		}	
		iWidth =clientWidth ;
		newWidth =iWidth ;
		if (document.all){
			document.all("content").style.height=constHeight + "px";
		}else{
			document.getElementById("content").style.height=constHeight -scrollDiff  + "px";
		}
		iHeight =clientHeight ;
		newHeight=iHeight ;
		if (document.all){
			document.all("sidebar-left").style.height=(constHeight) + "px";
		}else{
			document.getElementById("sidebar-left").style.height=(constHeight) + "px";
		}	
	}
	

    
	function RefreshContent(){
		
		CheckWidthMenuFireFox();
		if (document.all){
			clientWidthWindow =document.body.offsetWidth;
		}else{
		    clientWidthWindow =  document.documentElement.clientWidth;
		}
	
	
		if(document.getElementById("FooterClientWidthHeight").innerHTML != clientWidthWindow + " x " + clientHeightWindow){
			document.getElementById("FooterClientWidthHeight").innerHTML = clientWidthWindow + " x " + clientHeightWindow;
		}	
	

		if(document.all){
			iHeaderHeight  = document.all("MenuTable").offsetTop + document.all("MenuTable").offsetHeight;
			iLeftBarRight =  document.all("MenuLeftTable").offsetLeft + document.all("MenuLeftTable").offsetWidth;
			iLeftBarLeft  = document.all("MenuLeftTable").offsetLeft;
		}else{
			iHeaderHeight  = document.getElementById("MenuTable").offsetTop + document.getElementById("MenuTable").offsetHeight ;
			iLeftBarRight =  document.getElementById("MenuLeftTable").offsetLeft + document.getElementById("MenuLeftTable").offsetWidth;
			iLeftBarLeft  = document.getElementById("MenuLeftTable").offsetLeft;
		}		
		//alert(LeftTableTagWidth  );
			//alert(document.all("sidebar-left").style.width );

		constWidth =(clientWidthWindow -( iLeftBarRight+iLeftBarLeft  ));
		
		
	
		
		
		
		
		
		
		if(document.all){
			document.all("content").style.width =constWidth  + "px";
		}else{
			if(clientWidthWindow <=800){
				if(iLeftBarLeft+iLeftBarRight <120){
					document.getElementById("content").style.width =constWidth -67-scrollDiff  + "px";
			}else{
					document.getElementById("content").style.width =constWidth -67 + "px";
				}
			}else{
				
				if(iLeftBarLeft+iLeftBarRight <170){
					document.getElementById("content").style.width =(constWidth -18) - scrollDiff + "px";
				}else{
					document.getElementById("content").style.width =constWidth -18  + "px";
				}
			}	
		}
		
		
		
		
		
		
		document.getElementById("MiddleTable").width=document.getElementById("content").style.width ;
		
		
		
		
		
		if(document.all){
			if (is_opera ){
				constHeight =window.innerHeight-iHeaderHeight ;
			}else{
				constHeight =document.body.offsetHeight-iHeaderHeight  ;
			}
		}else{
			constHeight =window.innerHeight-iHeaderHeight ;
		}
		
		
		LeftTableTagWidth =iLeftBarRight +	iLeftBarLeft;
		
		
		if(!document.all){
			document.getElementById("MiddleTable").width = clientWidthWindow -LeftTableTagWidth ;
		}
		
		
		if (document.all){
			if (is_opera ){
				clientHeight =  window.innerHeight;
			}else{
				clientHeight =  document.body.offsetHeight;	
			}
		}else{
			clientHeight =  window.innerHeight;
		}
		
		if (LeftTableTagWidth >0){ 
			if(document.all){
				document.all("LeftTableTag").width =LeftTableTagWidth  + "px";
			}else{
				document.getElementById("LeftTableTag").width =LeftTableTagWidth  + "px";
			}
		}
		
	
		if (document.all){
			document.all("header").style.height = iHeaderHeight   + "px";
			document.all("sidebar-left").style.top= iHeaderHeight  +1  + "px";
			document.all("content").style.marginTop = iHeaderHeight +1   + "px";
			LeftImageTable.height = iHeaderHeight + "px";
			document.all("MiddleTable").height  =iHeaderHeight - document.all("MenuTable").offsetHeight + "px";
		}else{
			document.getElementById("header").style.height = iHeaderHeight   + "px";
			document.getElementById("sidebar-left").style.top= iHeaderHeight  +1  + "px";
			document.getElementById("content").style.marginTop = iHeaderHeight +1   + "px";
			document.getElementById("LeftImageTable").height = iHeaderHeight + "px";
			document.getElementById("MiddleTable").height  =iHeaderHeight - (document.getElementById("MenuTable").offsetHeight) + "px";
		}	
		
		
		
	
		
		
		iWidth =clientWidth ;
		newWidth =iWidth ;
		if (document.all){
			document.all("content").style.height=constHeight + "px";
		}else{
			document.getElementById("content").style.height=constHeight -scrollDiff  + "px";
		}
		
		iHeight =clientHeight ;
		newHeight=iHeight ;
		
		
		if (document.all){
			document.all("sidebar-left").style.height=(constHeight) + "px";
			document.all("sidebar-left").style.width = iLeftBarRight  + iLeftBarLeft  + "px"; 
			document.all("content").style.marginLeft=iLeftBarRight  + iLeftBarLeft + 1 + "px";
			document.all("LeftTableTag").width = iLeftBarRight  + iLeftBarLeft  + "px"; 
			LeftImageTable.width = iLeftBarRight  + iLeftBarLeft  + "px"; 
		}else{
			document.getElementById("sidebar-left").style.height=(constHeight) + "px";
			document.getElementById("sidebar-left").style.width = iLeftBarRight  + iLeftBarLeft  + "px"; 
			document.getElementById("content").style.marginLeft=iLeftBarRight  + iLeftBarLeft + 1 + "px";
			document.getElementById("LeftTableTag").width = iLeftBarRight  + iLeftBarLeft  + "px"; 
			document.getElementById("LeftImageTable").width =  iLeftBarRight  + iLeftBarLeft  + "px"; 
		}	
	
	
		
		if(isLoaded){
			scrollDiff = 0;
		}
	
		if(clientWidthWindow <=800){
			
			if(iLeftBarLeft+iLeftBarRight <120){
				if(document.all){
					document.all("sidebar-left").style.width = iLeftBarRight  + iLeftBarLeft  + scrollDiff   + "px";
					document.all("content").style.marginLeft=iLeftBarRight  + iLeftBarLeft + scrollDiff  + 1 + "px";
					document.all("LeftTableTag").width = iLeftBarRight  + iLeftBarLeft   + scrollDiff  + "px";
					document.all("LeftImageTable").width = iLeftBarRight  + iLeftBarLeft   + scrollDiff  + "px";
					document.all("content").style.width =constWidth-scrollDiff  + "px";
				}else{
					document.getElementById("sidebar-left").style.width = iLeftBarRight  + iLeftBarLeft  + scrollDiff   + "px";
					document.getElementById("content").style.marginLeft=iLeftBarRight  + iLeftBarLeft + scrollDiff  + 1 + "px";
					document.getElementById("LeftTableTag").width = iLeftBarRight  + iLeftBarLeft   + scrollDiff  + "px";
					document.getElementById("LeftImageTable").width = iLeftBarRight  + iLeftBarLeft   + scrollDiff  + "px";
					document.getElementById("content").style.width =constWidth-scrollDiff  + "px";
				}
			}else{
				if(document.all){
					document.all("content").style.width =constWidth  + "px";
				}else{
					document.getElementById("content").style.width =constWidth  + "px";
				}
			}
		}else{
				
			if(iLeftBarLeft+iLeftBarRight <170){
				if(document.all){
					document.all("sidebar-left").style.width = iLeftBarRight  + iLeftBarLeft  + scrollDiff   + "px";
					document.all("content").style.marginLeft=iLeftBarRight  + scrollDiff  + iLeftBarLeft  + 1 + "px";
					document.all("LeftTableTag").width = iLeftBarRight  + scrollDiff  + iLeftBarLeft   + "px";
					document.all("content").style.width =constWidth -scrollDiff + "px";
					LeftImageTable.width =  iLeftBarRight  + iLeftBarLeft  + scrollDiff; 
				}else{
					document.getElementById("sidebar-left").style.width = iLeftBarRight  + iLeftBarLeft  + scrollDiff   + "px";
					document.getElementById("content").style.marginLeft=iLeftBarRight  + scrollDiff  + iLeftBarLeft  + 1 + "px";
					document.getElementById("LeftTableTag").width = iLeftBarRight  + scrollDiff  + iLeftBarLeft   + "px";
					document.getElementById("content").style.width =constWidth -scrollDiff + "px";
					document.getElementById("LeftImageTable").width =  iLeftBarRight  + iLeftBarLeft  + scrollDiff    + "px"; 
				}
			}else{
				if(document.all){
					document.all("content").style.width =constWidth   + "px";
				}else{
					document.getElementById("content").style.width =constWidth   + "px";
				}
			}
		}	
		
		
		
		
		if(is_ie5_5 || is_ie5){
			document.all("content").style.width  = parseInt(document.all("content").style.width)-5;
			document.all("content").style.height  = parseInt(document.all("content").style.height)-5;
	
		}
		
	
		var sURL ="";
		var bTest = false;
		if(window.location.hash == ""){
			sURL = unescape(window.location.href);
		}else{
			sURL = unescape(window.location.href.replace(window.location.hash,""));
		}
		
		
		if(document.all){
	    	document.getElementById("MiddleTable").style.display="";
			document.getElementById("LeftImageTable").style.display="";
			if(document.getElementById("MenuTable").offsetLeft <= document.getElementById("MiddleTable").offsetLeft){
				document.getElementById("LeftImageTable").style.display="none";
				document.getElementById("MiddleTable").width="100%";
			}
		}else{
			if( bSetWidth){
				document.getElementById("MiddleTable").width="100%";
			}
		}

		bSetWidth = false;
		
		
		if(document.getElementById("MiddleTable").height != document.getElementById("MiddleTable").offsetHeight + "px" ){
			AlterHeights();
		}
		
		
		
		//document.getElementById("sidebar-left").style.width =document.getElementById("MenuLeftTable").offsetWidth + document.getElementById("MenuLeftTable").offsetLeft+ "px" ;


	}
	
	
	
	
	
	

		
	
	function takeOffPx(str){
		return parseInt(str.substring(0,str.length-2));
	}
	
	if (bolPrint ==false ){
		if(ReloadOnResize){

			if(clientWidth <=640){
				if(document.all){
					if (document.all("style").href.indexOf('css/main640minus.css')==-1){
						refresh();
					}
				}else{
					if (document.getElementById("style").href.indexOf('css/main640minus.css')==-1){
						refresh();
					}
				}
			}else if(clientWidth <=800){
				if(document.all){
					if (document.all("style").href.indexOf('css/main641to800.css')==-1){
						refresh();
					}
				}else{
					if (document.getElementById("style").href.indexOf('css/main641to800.css')==-1){
						refresh();
					}
				}
			}else if(clientWidth <=1199){
				if(document.all){
					if (document.all("style").href.indexOf('css/main801to1199.css')==-1){
						refresh();
					}
				}else{
					if (document.getElementById("style").href.indexOf('css/main801to1199.css')==-1){
						refresh();		
					}
				}
			}else if(clientWidth >=1200){
				if(document.all){
					if (document.all("style").href.indexOf('css/main1200plus.css')==-1){
						refresh();
					}
				}else{
					if (document.getElementById("style").href.indexOf('css/main1200plus.css')==-1){
						refresh();		
					}
				}
			}
		}
	}


	//sets hash on reload 	
 	if (location.hash.length>1){
		if(!is_opera){
			location.hash=location.hash.replace("#","");
		}
	}
	




	

	

	function setIsLoaded(bool){
		//window.document.body.style.cursor = "default";
		isLoaded = bool;
	}

	function SeeIfLoaded(){
		if(trimAll(window.location.hash.substring(1,iIndexSemiColon)) !=""){
			window.location.hash =  window.location.hash.substring(1,iIndexSemiColon);
		}
		if(isLoaded==true){
			AlterHashChild(sXml);
				
			window.status= "";
		}else{
			setTimeout("SeeIfLoaded()",50);
						
		}
	}

	
	
	var iIndexHash =-1;
	var iIndexSemiColon =0;
	var sXml ="";
	if(window.location.hash != "" ){
		iIndexHash =window.location.hash.indexOf("xml");
	}
	
	

	
	if(iIndexHash != -1){
		
		iIndexSemiColon= window.location.hash.indexOf(";");
		sXml =window.location.hash.substring(iIndexSemiColon+1,iIndexHash +3);
		makeRequestHead(sXml);
		setTimeout("SeeIfLoaded()",50);
	}	
	
	function runLicense2Code(){
		
		QueryString.keys = new Array();
		QueryString.values = new Array();
		QueryString_Parse();
		
		
		document.FrontPage_Form1.UniqueId.value = QueryString("UniqueId");
		
		
	    if(window.location.hash.indexOf("#") > 0 &&  ddocument.FrontPage_Form1.UniqueId.value != ""){
	    	var iIndexOf = 0;
	    	iIndexOf  = window.location.hash.indexOf("#");
	    	document.FrontPage_Form1.UniqueId.value =  window.location.href.substring(0, iIndexOf    );
		}
	    
	    if(document.FrontPage_Form1.UniqueId.value != ""){
	    	document.FrontPage_Form1.subject.value =  document.FrontPage_Form1.subject.value + " - " + document.FrontPage_Form1.UniqueId.value;
	    }
		
	}
	
	
	if(  window.location.hash.indexOf("license") !=-1 ){
		CheckLoaded();

	}
	
	
	if (bolPrint){
		Maximize();
	}
	function CheckLoaded(){
		if(isLoaded && bXMLDownloadedComplete ){
			setTimeout("runLicense2Code()",1000);
		}else{
			setTimeout("CheckLoaded()",50);
	
		}
	}