var ids=new Array('Paintings');
var poems= new Array('aware','into the sky','look ahead','outside','seared','thick','to share a gift for one');
var scrolldelay = null;

function pageScrolldown() {
    	window.frames['splash'].scrollBy(0,50); // horizontal and vertical scroll increments
    	scrolldelay = setTimeout('pageScrolldown()',100); // scrolls every 100 milliseconds
}


function stopScrolldown() {
    	if(scrolldelay != null)
    	{
    	clearTimeout(scrolldelay);
    	}
}

function pageScrollup() {
    	window.frames['splash'].scrollBy(0,-50); // horizontal and vertical scroll increments
    	scrolldelay = setTimeout('pageScrollup()',100); // scrolls every 100 milliseconds
}


function stopScrollup() {
    	
    	if(scrolldelay != null)
    	{
    	clearTimeout(scrolldelay);
    	}
}


function scrollleft(){

//document.all.myMarquee.direction='right';
document.all.myMarquee.direction='left';
document.all.myMarquee.scrollAmount = 7;
}


function scrollright(){
//document.all.myMarquee.direction='left';
document.all.myMarquee.direction='right';
document.all.myMarquee.scrollAmount = 7;
}


function scrolldefault()
{
document.all.myMarquee.direction='left';
document.all.myMarquee.scrollAmount = 3;
}


function LoadPiece(img)
{
	LoadExternData("<center><div  id=\"poetry\" name=\"poetry\" class=\"poetry\" ><img src=\"poetry/"+img+".png\" style=\"width: 35em;\"></div></center>","piece");
}


function LoadExternData(data,tag)
{
	document.getElementById(""+tag).innerHTML = ""+data;
}


function DisplaySplash()
{
	
	obj = document.getElementById('previewframe');
	obj.style.position = "absolute";
	obj.style.visibility = "hidden";	
	LoadExtern('http://www.universalthroughput.com/site/frontend.html','ext','splash');
	obj = document.getElementById('ext');
	obj.style.visibility = "visible";
	obj.style.position = "absolute";
	obj.style.width = "100%";
	obj.style.height = "58%";	
	obj.style.top = "10%";
	obj.style.left = "0%";
	
	obj.style.borderTop = "0px solid #C0C0C0";
	obj.style.borderBottom = "0px solid #C0C0C0";	
	obj.style.borderLeft = "0px solid #C0C0C0";
	obj.style.borderRight = "0px solid #C0C0C0";
	//obj.style.backgroundColor = "#000000";
	obj.style.fontColor = "#ffffff";
	
}


function DisplayMerchandise()
{

	obj = document.getElementById('fixedgallery');
		if(obj != null)
			{
			obj.style.visibility = "hidden";
			}
			
			

	obj = document.getElementById('previewframe');
	obj.style.position = "absolute";
	obj.style.visibility = "hidden";	
	LoadExtern('http://www.universalthroughput.com/site/merchandise.html','ext','splash');
	
	//LoadExternal('http://www.universalthroughput.com/site/merchandise.html','fixedgallery',true,true,true);
	
	obj = document.getElementById('ext');
	obj.style.visibility = "visible";
	obj.style.position = "absolute";
	obj.style.width = "100%";
	obj.style.height = "58%";	
	obj.style.top = "8%";
	obj.style.left = "0%";
	
	obj.style.borderTop = "0px solid #C0C0C0";
	obj.style.borderBottom = "0px solid #C0C0C0";	
	obj.style.borderLeft = "0px solid #C0C0C0";
	obj.style.borderRight = "0px solid #C0C0C0";
	//obj.style.backgroundColor = "#000000";
	obj.style.fontColor = "#ffffff";

}




function DisplayLinks()
{
	
	obj = document.getElementById('fixedgallery');
		if(obj != null)
			{
			obj.style.visibility = "hidden";
			}

	obj = document.getElementById('previewframe');
	obj.style.position = "absolute";
	obj.style.visibility = "hidden";	
	LoadExtern('http://www.universalthroughput.com/site/links.html','ext','splash');
	obj = document.getElementById('ext');
	obj.style.visibility = "visible";
	obj.style.position = "absolute";
	obj.style.width = "100%";
	obj.style.height = "50%";	
	obj.style.top = "8%";
	obj.style.left = "0%";	
	obj.style.borderTop = "0px solid #C0C0C0";
	obj.style.borderBottom = "0px solid #C0C0C0";	
	obj.style.borderLeft = "0px solid #C0C0C0";
	obj.style.borderRight = "0px solid #C0C0C0";
	//obj.style.backgroundColor = "#000000";
	obj.style.fontColor = "#ffffff";
	
}





function DisplayContact()
{
	//document.getElementById('contacter').style.visibility = "hidden";
	LoadExtern('http://www.universalthroughput.com/site/contact.html','ext','contacter');
	obj = document.getElementById('fixedgallery');
		if(obj != null)
			{
			obj.style.visibility = "hidden";
			}	
	
	obj = document.getElementById('previewframe');
	obj.style.visibility = "hidden";
	obj = document.getElementById('ext');
	obj.style.visibility = "visible";
	obj.style.position = "absolute";
	obj.style.width = "100%";
	obj.style.height = "50%";	
	obj.style.top = "8%";
	obj.style.left = "0%";		
	obj.style.borderTop = "0px solid #C0C0C0";
	obj.style.borderBottom = "0px solid #C0C0C0";	
	obj.style.borderLeft = "0px solid #C0C0C0";
	obj.style.borderRight = "0px solid #C0C0C0";
	obj.style.backgroundColor = "transparent";
	
	obj.style.fontColor = "#ffffff";
	//obj.style.backgroundImage = "url('bd.png')";
	//obj.style.backgroundRepeat= "repeat-x";
	
	
	
}







function DisplayGallery()
{

	LoadExtern('http://www.universalthroughput.com/egallery/exec/cli.cgi?R=%27/Paintings%27&sidx=0','ext','paintings');
	
	LoadExternal('http://www.universalthroughput.com/egallery/exec/cli.cgi?R=%27/Paintings%27&sidx=0&cfg=fgal','fixedgallery',true,true,true);

	obj = document.getElementById('MainC');
	obj.style.visibility = "hidden";
	
	obj = document.getElementById('fixedgallery');
        obj.style.visibility = "visible";
        obj.style.position = "absolute";
        obj.style.top = "17%";
        obj.style.left = "12%";
         obj.style.width = "75%";
         obj.style.height = "60%";
	
	obj = document.getElementById('ext');
	obj.style.visibility = "visible";
	obj.style.position = "absolute";
	obj.style.width = "100%";
	obj.style.height = "130px";
	//obj.style.zIndex = "2000";
	obj.style.top = "0%";
	obj.style.left = "0%";
	//obj.style.backgroundColor = "#000000";
	obj.style.borderTop = "1px solid #606060";
	obj.style.borderBottom = "0px solid #606060";	
	obj.style.borderLeft = "0px solid #C0C0C0";
	obj.style.borderRight = "0px solid #C0C0C0";	
	var tmp = obj;
	
	
	obj = document.getElementById('previewframe');
	obj.style.position = "absolute";
	//obj.style.visibility = "visible";
	
	obj.style.visibility = "hidden";
	obj.style.borderTop = "2px solid #C0C0C0";
	obj.style.borderBottom = "1px solid #C0C0C0";	
	obj.style.borderLeft = "0px solid #C0C0C0";
	obj.style.borderRight = "0px solid #C0C0C0";
	obj.style.backgroundColor = "#000000";
	obj.style.backgroundImage = "url('bd.png')";
	obj.style.backgroundRepeat= "repeat-x";
	/*
	   background-image:url('shde.png');
  background-repeat: repeat-x;
	*/
	if ((/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)))
	{
		var ffversion=new Number(RegExp.$1) // capture x.x portion and store as a number
		 if (ffversion>=3)
		 {
			
			obj.style.opacity= "0.90";
			obj.style.mozOpacity= "0.90";//filter:alpha(opacity=65);	
		 }
		 tmp.style.top = "30px";
	}
	else if((/Safari/.test(navigator.userAgent)))
	{
		var browserVer=parseInt(navigator.appVersion);
		if(browserVer>=3)
		 {
		obj.style.opacity= "0.90";
		
		 }
		 tmp.style.top = "30px";
	}
	else
	{
		tmp.style.top = "40px";
		previewframe.style.filter='alpha(opacity=80)';
	}
	obj.style.zIndex = "1000";
	obj.style.left = "25%";	
	obj.style.top = "22.5%";
	
	obj.style.height = "55%";
	obj.style.width = "50%";
	//obj.style.overflow = "auto";
	//LoadExternal('http://www.universalthroughput.com/egallery/exec/cli.cgi?R=%27/Paintings%27&sidx=0','ext',true,true);

	
	//LoadExtern('http://www.universalthroughput.com/egallery/exec/cli.cgi?R=%27/Paintings%27&sidx=0&cfg=fgal','fixedgallery');
	
}


function DisplayPoetry()
{
	var html = ""; 
	for(var i=0;i<poems.length-1;i++)
	{
		html +="<a href=\"\" style=\"font-family:sans-serif;font-size: 20;color: #ffffff;border-style: solid solid solid solid;border-width: 0px 0px 0px 0px;\"><i style=\"font-style:none;\">"+poems[i]+"</i></a><b style=\"color:#C0C0C0;\"> //</b> ";
	}
	html +="<a href=\"\" style=\"font-family:sans-serif;font-size: 20;color: #ffffff;border-style: solid solid solid solid;border-width: 0px 0px 0px 0px;\"><i style=\"font-style:none;\">"+poems[poems.length-1]+"</i></a>";
	
	obj = document.getElementById('MainC');
	obj.style.visibility = "hidden";
	obj = document.getElementById('ext');	
	//obj.style.visibility = "hidden";
	obj.style.visibility = "visible";
	obj.style.position = "absolute";
	obj.style.width = "100%";
	obj.style.height = "50px";
	//obj.style.zIndex = "5000";
	obj.style.top = "50px";
	obj.style.left = "0%";	
	obj.innerHTML = "<center><img src=\"sla.png\"><marquee behavior=ALTERNATE scrollamount=\"2\" width=\"60%\" height=\"100%\" align=\"center\">\r\n<div width=\"100%\" height=\"100%\"><center>"+html+"</center></div>\r\n</marquee><img src=\"sra.png\"></center><div style=\"top:48px;left:20%;height:2px;width:60%;\"><img src=\"trim.png\" width=\"100%\" height=\"100%\"></div>";
	obj.style.borderTop = "0px solid #C0C0C0";
	obj.style.borderBottom = "0px solid #C0C0C0";	
	obj.style.borderLeft = "0px solid #C0C0C0";
	obj.style.borderRight = "0px solid #C0C0C0";
	
	if ((/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)))
	{
		var ffversion=new Number(RegExp.$1) // capture x.x portion and store as a number
		 if (ffversion>=3)
		 {
			
			//obj.style.opacity= "0.90";
			//obj.style.mozOpacity= "0.90";//filter:alpha(opacity=65);	
		 }	
	}
	else if((/Safari/.test(navigator.userAgent)))
	{
		var browserVer=parseInt(navigator.appVersion);
		if(browserVer>=3)
		 {
		//obj.style.opacity= "0.90";
		 }
	}
	else
	{
		//previewframe.style.filter='alpha(opacity=80)';
	}	
	
	obj = document.getElementById('previewframe');
	obj.style.visibility = "visible";
	obj.style.borderTop = "2px solid #C0C0C0";
	obj.style.borderBottom = "1px solid #C0C0C0";	
	obj.style.borderLeft = "0px solid #C0C0C0";
	obj.style.borderRight = "0px solid #C0C0C0";
	obj.style.backgroundColor = "#000000";
	obj.style.zIndex = "5000";
	obj.style.left = "25%";	
	obj.style.top = "22.5%";
	
	obj.style.height = "55%";
	obj.style.width = "50%";
	obj.style.overflow = "visible";
	LoadExtern('http://www.universalthroughput.com/site/poetry.html','previewframe','poetry');
}







function LoadExtern(page,tag,id)
{
	        	
	        	
	        	
	        	if(tag != 'ext')
			{
			
			
			
			obj = document.getElementById('fixedgallery');
			
			if(obj != null)
			{
			obj.style.visibility = "hidden";
			}
			
			
			obj = document.getElementById('whiteout');
			obj.style.visibility = "visible";
			
			}
	     page = page.replace("#","'");
	     page = page.replace("#","'");
 	        	if(tag == 'ext')
			{

			if(page.indexOf("merch") != -1)
			{
			 document.getElementById(""+tag).innerHTML ="<center><h2>M E R C H A N D I S E</h2><br>[ <a onMouseover=\"javascript:stopScrollup();pageScrolldown()\" onmouseout=\"stopScrolldown()\">Scroll Down</a> ]   [ <a onMouseover=\"javascript:stopScrolldown();pageScrollup()\" onmouseout=\"stopScrollup()\">Scroll Up</a> ]<div style=\"height:2px;width:100%;\"><img src=\"http://www.universalthroughput.com/site/trim.png\" width=\"100%\" height=\"100%\"></div><br><div id=\"divp"+id+"\" style=\"visibility:hidden;overflow-x: hidden;overflow-y: hidden;\"><iframe src="+page+"  allowtransparency=\"true\" onload=\"document.getElementById('divp"+id+"').style.visibility = 'visible';\" name=\""+id+"\" scrolling=\"yes\" frameborder=\"0px\" style=\"overflow-x: hidden;overflow-y: auto; width:100%;height:400px; border: none;background-color:#2F2F4F;foreground-color:#ffffff;\" valign=\"top\"/><br></div><div style=\"position:relative;top:0;left:0;height:2px;width:100%;\"><img src=\"http://www.universalthroughput.com/site/trim.png\" width=\"100%\" height=\"100%\"></div></center>";	

			}
			else
			{
			 document.getElementById(""+tag).innerHTML ="<center><div id=\"divp"+id+"\" style=\"visibility:hidden;overflow-x: hidden;overflow-y: hidden;\"><iframe src="+page+"  onload=\"document.getElementById('divp"+id+"').style.visibility = 'visible';\" name=\""+id+"\" scrolling=\"no\" frameborder=\"0\" allowtransparency=\"true\" style=\"overflow-x: hidden;overflow-y: hidden; width:100%;height:100%; border: none;background-color:#2F2F4F;foreground-color:#ffffff;\" valign=\"top\"/></div></center>";	

			
			}

			
			
			}
			else
			{
		document.getElementById(""+tag).innerHTML ="<center><table style=\"width:100%;height:22px; border: none;background-color:#000000;foreground-color:#ffffff;\"><tr><td><a href=\"Javascript:ClosePreviewFrame();\"  style=\"text-decoration: none; border-width: 0px 0px 0px 0px; color: #ffffff; border:none;\"><img src=\"http://www.universalthroughput.com/site/closebutton.png\" BORDER=\"0\"></a></td></tr></table><font color=\"#ffffff\">P R E V I E W</font><iframe src="+page+" scrolling=\"yes\" frameborder=\"0\" style=\"width:100%;height:100%; background-color:#2F2F4F;foreground-color:#ffffff;\" valign=\"top\"/></center>";
			}
	      if(tag == "previewframe")
              {
   			document.getElementById("divppaintings").style.visibility = "hidden";
   			
   			obj = document.getElementById('previewframe');
			

			
			
			obj.style.position = "absolute";
			obj.style.visibility = "visible"; 
			obj.style.borderTop = "1px solid #C0C0C0";
			obj.style.borderBottom = "1px solid #C0C0C0";	
			obj.style.borderLeft = "1px solid #C0C0C0";
			obj.style.borderRight = "1px solid #C0C0C0";
			obj.style.backgroundColor = "#000000";
			obj.style.backgroundImage = "url('bd.png')";
			obj.style.backgroundRepeat= "repeat-x";
			obj.style.left = "12%";	
			obj.style.top = "10%";
			
			obj.style.height = "80%";
			obj.style.width = "75%";
			obj.style.zIndex = "5000";
			//obj.style.overflow = "auto";
			
			

			
			
			//alert("test");
              }
}



 function ClosePreviewFrame()
 {
   			
   			document.getElementById("divppaintings").style.visibility = "visible";
   			
   			obj = parent.document.getElementById('whiteout');
			obj.style.visibility = "hidden";
			
			obj = parent.document.getElementById('previewframe');
			//obj.style.position = "absolute";
			obj.style.visibility = "hidden";

			obj = document.getElementById('fixedgallery');
			obj.style.visibility = "visible";			
	
 }


 function LoadExternByParent(page,tag)
{
	     
	        	obj = parent.document.getElementById('whiteout');
			obj.style.visibility = "visible";
			obj = parent.document.getElementById('fixedgallery');
			obj.style.visibility = "hidden";
	     
	     page = page.replace("#","'");
	     page = page.replace("#","'");
             parent.document.getElementById(""+tag).innerHTML ="<center><table style=\"width:100%;height:22px; border: none;background-color:#000000;foreground-color:#ffffff;\"><tr><td><a href=\"Javascript:ClosePreviewFrame();\"  style=\"text-decoration: none; border-width: 0px 0px 0px 0px; color: #ffffff; border:none;\"><img src=\"http://www.universalthroughput.com/site/closebutton.png\" BORDER=\"0\"></a></td></tr></table><font color=\"#ffffff\">P R E V I E W</font><iframe src="+page+" scrolling=\"yes\" frameborder=\"0\" style=\"width:100%;height:100%; background-color:#2F2F4F;foreground-color:#ffffff;\" valign=\"top\"/></center>";
              if(tag == "previewframe")
              {
   			
   			parent.document.getElementById("divppaintings").style.visibility = "hidden";
   			obj = parent.document.getElementById('previewframe');
			obj.style.position = "absolute";
			obj.style.visibility = "visible"; 
			obj.style.borderTop = "1px solid #C0C0C0";
			obj.style.borderBottom = "1px solid #C0C0C0";	
			obj.style.borderLeft = "1px solid #C0C0C0";
			obj.style.borderRight = "1px solid #C0C0C0";
			obj.style.backgroundColor = "#000000";
			obj.style.backgroundImage = "url('bd.png')";
			obj.style.backgroundRepeat= "repeat-x";
			obj.style.left = "12%";	
			obj.style.top = "10%";
			
			obj.style.height = "80%";
			obj.style.width = "75%";
			obj.style.zIndex = "5000";
			//obj.style.overflow = "auto";
			
			//alert("test");
              }


}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
	//alert(document.cookie);
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}



//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function LoadExternal(page,tag,T,async,isparent)
{
page = page.replace(/\#/ig,"'");

var TS = 0;

if(page.indexOf("R=") == -1 && page.indexOf("ref=") == -1)
{
	//var d = readCookie("lastgal");
	//arr = d.split('|');	
	//page = arr[arr.length-2];
	//page = page.replace(/\#/ig,"'");
	//eraseCookie("lastgal");
	//TS=1;
	page = "http://www.universalthroughput.com/egallery/exec/cli.cgi?R=%27/Paintings%27&sidx=0&cfg=fgal";
	
}
              if(tag == "previewframe")
              {

	                //if(isparent == true)
			//{
				obj = document.getElementById('whiteout');
				obj.style.visibility = "visible";
			//}
   			obj = document.getElementById('previewframe');
			obj.style.position = "absolute";
			obj.style.visibility = "visible"; 
			obj.style.borderTop = "2px solid #C0C0C0";
			obj.style.borderBottom = "1px solid #C0C0C0";	
			obj.style.borderLeft = "0px solid #C0C0C0";
			obj.style.borderRight = "0px solid #C0C0C0";
			obj.style.backgroundColor = "#000000";
			obj.style.backgroundImage = "url('bd.png')";
			obj.style.backgroundRepeat= "repeat-x";
			obj.style.left = "12%";	
			obj.style.top = "10%";
			
			obj.style.height = "80%";
			obj.style.width = "75%";
			obj.style.zIndex = "5000";			
	
              }
           /*
           else if(tag == "fixedgallery")
              {            
  	obj = document.getElementById('fixedgallery');
        obj.style.visibility = "visible";
        obj.style.position = "absolute";
        obj.style.top = "18%";
        obj.style.left = "0%";
         obj.style.width = "100%";
         obj.style.height = "110%";            
              
              
              }
       */


if(T == true)
{
    document.getElementById(""+tag).innerHTML = "<center><table><tr><td>Loading</td></tr></table></center>";
}
var xhr;
if (window.XMLHttpRequest)  {
    xhr = new XMLHttpRequest();
}
else
 if (window.ActiveXObject)
 {
    xhr = new ActiveXObject("Microsoft.XMLHTTP");  // Internet Explorer
 }
    xhr.onreadystatechange  = function()
    {
         if(xhr.readyState  == 4)
         {
              if(T == true)
              {
              if(xhr.status  == 200)
              {
	      document.getElementById(""+tag).innerHTML =""  + xhr.responseText +"";
	      }
              else
              {
              document.getElementById(""+tag).innerHTML ="Error code " + xhr.status;
              }	      
	       if(tag == "previewframe")
              {	     
	      		document.getElementById(""+tag).innerHTML = "<center><table style=\"width:100%;height:22px; border: none;background-color:#000000;foreground-color:#ffffff;\"><tr><td><a href=\"Javascript:ClosePreviewFrame();\">close</a></td></tr></table>"+document.getElementById(""+tag).innerHTML+"</center>";
	
		for (var fs =document.getElementById(""+tag).links,numLinks = fs.length, i=0; i<numLinks; i++)
		{
		var link = fs[i].href;
                 link = link.replace(/\'/ig,"#");
                 if(fs[i].href.indexOf("javascript:") == -1 && fs[i].href.indexOf("LoadExternal") == -1)
                 {
                       if(ls[i].href.indexOf("cli.cgi") != -1 && ls[i].href.indexOf("pcli.php") != -1)
                      {
                      fs[i].href = "javascript:LoadExternal(\""+link+"\",\"fixedgallery\",true,false,true);";
                      }
                 }
                }			
	      
	      }             
              if(tag == "fixedgallery")
              {		
	             for (var ls = document.links, numLinks = ls.length, i=0; i<numLinks; i++){
                 var link = ls[i].href;
                 link = link.replace(/\'/ig,"#");
                 if(ls[i].href.indexOf("javascript:") == -1 && ls[i].href.indexOf("LoadExternal") == -1)
                 {
                      if(ls[i].href.indexOf("cli.cgi") != -1 && ls[i].href.indexOf("pcli.php") != -1)
                      {
                      ls[i].href = "javascript:LoadExternal(\""+link+"\",\"previewframe\",true,false,true);";
                      }
                 }
	
	      }
	      }
              if(tag == "ext")
              {		
                for (var ls = document.links, numLinks = ls.length, i=0; i<numLinks; i++){
                 var link = ls[i].href;
                 link = link.replace(/\'/ig,"#");
                 if(ls[i].href.indexOf("javascript:") == -1 && ls[i].href.indexOf("LoadExternal") == -1)
                 {
                      if(ls[i].href.indexOf("cli.cgi") != -1 && ls[i].href.indexOf("pcli.php") != -1)
                      {
                      ls[i].href = "javascript:LoadExternal(\""+link+"\",\"previewframe\",true,false,true);";
                      }
                 }
                }

               }
         }}
    };
   xhr.open("GET", ""+page,  async);
   xhr.setRequestHeader( "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT" );
   xhr.send(null);
   
   if(async == true)
   {
    //return true;
   }
   else
   {




   return xhr;
   }
}



function replaceImage(img, replacementImage)
{
    img.onload = null;
    img.src = replacementImage;
}





var wH;
var wW;
var wHnav;


function WindowWidth() {
  wW = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    wW = window.innerWidth;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    wW = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    wW = document.body.clientWidth;
    }
  //return wW;
}

function WindowHeight() {
  wH = 0;
  if( typeof( window.innerHeight ) == 'number' ) {
    //Non-IE
    wH = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    wH = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    wH = document.body.clientHeight;
    }
  //return wH;
}



function fixedgalleryloader ()
{
//setOpacity(document.getElementById('fixedgallery'), 0);
//initImage('fixedgallery');
}


function l () {

//setOpacity(document.getElementById('thebody'), 0);

//document.getElementById('thebody').style.visibility = "visible";

WindowWidth();
WindowHeight();

wHnav =  - 50;
			obj = document.getElementById('fixedgallery');
			obj.style.visibility = "hidden";
DisplaySplash();


obj= document.getElementById("stat");
obj.style.position = "absolute";
obj.style.top = wH-75+"px";
//obj.style.left = (wW-250)+"px";
obj.style.left = "5px";
obj.style.width = "250px";
obj.style.height = "180px";
obj.style.backgroundColor= "transparent";
obj.style.borderWidth= "0px 0px 0px 0px";
obj.style.borderStyle= "solid solid solid solid";
obj.style.borderColor= "#9F9F9F #9F9F9F #9F9F9F #9F9F9F";
obj.style.visibility= "visible";

obj= document.getElementById("nav");
obj.style.position = "absolute";
obj.style.top = wH-180+"px";
obj.style.left = (wW-250)+"px";
//obj.style.left = "5px";
obj.style.width = "250px";
obj.style.height = "180px";
obj.style.backgroundColor= "transparent";
obj.style.borderWidth= "0px 0px 0px 0px";
obj.style.borderStyle= "solid solid solid solid";
obj.style.borderColor= "#9F9F9F #9F9F9F #9F9F9F #9F9F9F";
obj.style.visibility= "visible";

obj = document.getElementById("MainC");
obj.style.visibility = "hidden";
obj.style.top = (wHnav-150)+"px";
obj.style.width = wW+"px";
obj.style.width = "600px";

//document.write("<style type='text/css'>\n#background-img {visibility:hidden;} </style>");

initImage('background-img');



}


function loadthis () {



var screenW = 640, screenH = 480;
if (parseInt(navigator.appVersion)>3) {
 screenW = screen.width;
 screenH = screen.height;
}
else if (navigator.appName == "Netscape"
    && parseInt(navigator.appVersion)==3
    && navigator.javaEnabled()
   )
{
 var jToolkit = java.awt.Toolkit.getDefaultToolkit();
 var jScreenSize = jToolkit.getScreenSize();
 screenW = jScreenSize.width;
 screenH = jScreenSize.height;
}


var bg = document.getElementById("bg");
//bg.width = 1280;
bg.style.left = (screenW/2) - (bg.width/1.86);
var bgl = document.getElementById("bgl");
bgl.style.left = bg.width/4.24 - bg.width;
var bgr = document.getElementById("bgr");
bgr.style.left = bg.width + bg.width/4.24;
//alert(''+bg.width);



}


function resizethis () {
l();


}


function initImage(i) {
  imageId = i;
  image = document.getElementById(imageId);
  setOpacity(image, 0);
  image.style.visibility = 'visible';
  fadeIn(imageId,0);
}

//The setOpacity function is passed an object and an opacity value. It then sets the opacity of the supplied object using four proprietary ways. It also prevents a flicker in Firefox caused when opacity is set to 100%, by setting the value to 99.999% instead.

function setOpacity(obj, opacity) {
  opacity = (opacity == 100)?99.999:opacity;
  
  // IE/Win
  obj.style.filter = "alpha(opacity:"+opacity+")";
  
  // Safari<1.2, Konqueror
  obj.style.KHTMLOpacity = opacity/100;
  
  // Older Mozilla and Firefox
  obj.style.MozOpacity = opacity/100;
  
  // Safari 1.2, newer Firefox and Mozilla, CSS3
  obj.style.opacity = opacity/100;
}

//The fadeIn function uses a Timeout to call itself every 100ms with an object Id and an opacity. The opacity is specified as a percentage and increased 10% at a time. The loop stops once the opacity reaches 100%:

function fadeIn(objId,opacity) {
  if (document.getElementById) {
    obj = document.getElementById(objId);
    if (opacity <= 100) {
      setOpacity(obj, opacity);
      opacity += 10;
      window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 100);
    }
  }
}



 
