breakFrames();

//var strBrowser = getBrowser();

function DoNothing() { }

function LoadImages( ) {
  //if( isMinNS4 || isMinIE4 ) {
  //img1  = new Image( );

  // img1.src  = "images/home-pic-1b.jpg";
  //}
}

//LoadImages( );

/*
Script made by Martial Boissonneault © 2001-2002 http://getElementById.com/
This script may be used and changed freely as long as this msg is intact
Visit http://getElementById.com/ for more free scripts and tutorials.
*/
timerID = null;
        
function ScrollUp(speed){
    	if(document.getElementById){
        	if(parseInt(txt.style.top) < 0){
        		txt.style.top = parseInt(txt.style.top) + speed + "px";
		}
        	timerID = setTimeout("ScrollUp("+speed+")",30)
    	}
}

function ScrollDown(speed){
    	if(document.getElementById){                        
        	if(parseInt(txt.style.top) > cnt.offsetHeight - txt.offsetHeight){ 
        		txt.style.top = parseInt(txt.style.top) - speed + "px";
		}
        	timerID = setTimeout("ScrollDown("+speed+")",30)
    	}
}

function ScrollStop(){
    	if(document.getElementById){
        	clearTimeout(timerID);
    	}
}

function ScrollInit() {
   	if (document.getElementById) {
        	cnt = document.getElementById("cont");
        	txt = document.getElementById("text");
        	txt.style.top = 0;
    	}
}


function RollOverButton(tdID) {
	tdID.className = "menu-button-over";
}

function RollOutButton(tdID) {
	tdID.className = "menu-button";
}

function getURL(StrUrl) {
	window.location.href = StrUrl;
}

function Redir(StrUrl) {
	window.location.href = StrUrl;
}
// =========== Functions that gets the value of a key (strKey) from the GET query string. ==========

function jsGet(strKey) {
    var strUrl, strOut, strKey;
    var strUrlArray, strRecArray;
	var startPos, endPos, x;
	strOut = "";
    strUrl = window.location.href;
    startPos = strUrl.indexOf("?")+1;
    endPos = strUrl.length;
    strUrl = strUrl.substring(startPos, endPos);
    strUrlArray = strUrl.split("&");
    for (x=0; x < strUrlArray.length; x++) {
        strRecArray = strUrlArray[x].split("=");
        if (strKey==strRecArray[0]){
            strOut = strRecArray[1];
			break;
        }
    }
    return strOut;
}


/********************************************************
variable getResolution();
Gets the clients available screen width and returns the 
width in "a,b,c,d or e" depending on the resolution. 
Will return "z" on unsupported resolutions.
Possible future modifications could be if both are null,
open a new browser window "full screen" write an image
100% x 100% get the image size and return the values.
********************************************************/

function getResolution(){
	var iWidth, iHeight, sRes;

	if (window.innerWidth != null) {
		iWidth = window.innerWidth;
		iHeight = window.innerHeight; 
	}


		else if (document.body.clientWidth != null) {
			iWidth = document.body.clientWidth;
			iHeight=document.body.clientHeight;
		}
		else { iWidth = 640; }
		if(iWidth <= 640) 
			{sRes = 1;}		// 640 x 480 Resolution
		else if(iWidth <= 800)
			{sRes = 2;}		// 800 x 600 Resolution
		else if(iWidth <= 1024)
			{sRes = 3;}		// 1024 x 800 Resolution
		else if(iWidth <= 1280)
			{sRes = 4;}		// 1280 x 1024 Resolution
		else if(iWidth <= 1600)
			{sRes = 5;}		// 1600 x 1200 Resolution
		else {sRes = 6}
		return (sRes);
}


/********************************************************
getBrowser();
Gets the users browser type and returns "ie5, ie4, ie3, 
ns6, ns4, ns3". Will return "other" on any other browser.
********************************************************/

function getBrowser() {
	var vBrowser=navigator.appName;			
	var vVersion=navigator.appVersion;
	var sBrowser;
	if (vBrowser.indexOf("Microsoft")>=0 && vVersion.indexOf("6")>=0)
		{sBrowser="ie5";} 	// Microsoft Internet Explorer 5.x
	else if (vBrowser.indexOf("Microsoft")>=0 && vVersion.indexOf("5")>=0)
		{sBrowser="ie5";} 	// Microsoft Internet Explorer 5.x
	else if (vBrowser.indexOf("Microsoft")>=0 && vVersion.indexOf("4")>=0)
		{sBrowser="ie4";}		// Microsoft Internet Explorer 4.x
	else if (vBrowser.indexOf("Microsoft")>=0 && vVersion.indexOf("3")>=0)
		{sBrowser="ie3";}	// Microsoft Internet Explorer 3.x
	else if (vBrowser.indexOf("Netscape")>=0 && vVersion.indexOf("6")>=0)
		{sBrowser="ns6";}	// Netscape Navigator 6.x
	else if (vBrowser.indexOf("Netscape")>=0 && vVersion.indexOf("4")>=0)
		{sBrowser="ns4";}	// Netscape Navigator 4.x
	else if (vBrowser.indexOf("Netscape")>=0 && vVersion.indexOf("3")>=0)
		{sBrowser="ns3";}	// Netscape Navigator 3.x
	else
		{sBrowser="other";}	// All Others 	
	return(sBrowser);
}	


/********************************************************
breakFrames();
breakFrames() Tests if user was linked to here within
a frame. If true then will reopen current location
in the parent window.
********************************************************/

function breakFrames(){
	if(self.parent.frames.length != 0)
		{self.parent.location = document.location;}
}
