function getCookie(name) { // use: getCookie("name");
    var index = logged.indexOf(name + "=");
    if (index == -1) return null;
    index = logged.indexOf("=", index) + 1;
    var endstr = logged.indexOf(";", index);
    if (endstr == -1) endstr = logged.length;
	if(unescape(logged.substring(index, endstr))=="true"){
	loggedIn="true";
	}
    return unescape(logged.substring(index, endstr));
}


function moveScroll(theTop){
document.getElementById("content").style.top=theTop;
}
	 
	 
function rollOn(imgName)
 {
if(document.images){
      imgOn=eval(imgName + "_on.src");
      document[imgName].src= imgOn;
	  }
 }

function rollOff(imgName)
 {
 if(document.images){
      imgOff=eval(imgName + "_off.src");
      document[imgName].src= imgOff;
	  }
 }


function swapImage(imgName,imgSrc)
{
if(document.images){
imgSrc=eval(imgSrc + ".src");
document[imgName].src=imgSrc;
	}
}

function showDiv(id){
hideDivs(4);
if(document.getElementById(id).style.display == "none"){
document.getElementById(id).style.display = "block";
}else{ 
document.getElementById(id).style.display = "none";
}
}


function hideDivs(divNum){
for(i=1; i<=divNum; i++){
if(document.getElementById('sub'+i).style.display == "block"){
document.getElementById('sub'+i).style.display = "none";
}
}return true;
}

function showMenu(divName)
{
if(document.images){
document.getElementById(divName).style.visibility = "visible";
}
}

function hideMenu(divName)
{
if(document.images){
document.getElementById(divName).style.visibility = "hidden";
}
}


function verifyCompatibleBrowser(){ 
    this.ver=navigator.appVersion 
    this.dom=document.getElementById?1:0 
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
    this.ie4=(document.all && !this.dom)?1:0; 
    this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
 
    this.ns4=(document.layers && !this.dom)?1:0; 
    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) 
    return this 
} 

function openT3Window(href) {
//bw=new verifyCompatibleBrowser();
//if(bw.ns4){
//newWindow=window.open(href,'_new_','toolbar=no,scrollbars=no,location=no,resizable=no,width=576,height=414');
//}else{
//newWindow=window.open(href,'_new_','toolbar=no,scrollbars=no,location=no,resizable=no,width=576,height=414');
//}
//newWindow.focus();
window.location.href=href
}
function closeWindow() {
self.close();
}

function openConfigWindow(href,name,width,height) {
//newWindow=window.open(href,name,'toolbar=no,scrollbars=yes,resizable=yes,location=no,width='+width+',height='+height+'');
//newWindow.focus();
window.location.href=href
}

function openWindowSized(href,name,width,height) {
if(name == "tour") {
newWindow=window.open(href,name,'toolbar=no,scrollbars=no,resizable=yes,location=no,width=800,height=600');
newWindow.focus();
}else{
window.location.href=href
}
}

function openWindow(href,name){
newWindow=window.open(href,name,'toolbar=no,scrollbars=yes,resizable=yes,width=576,height=414');
newWindow.focus();
}

function openUploadWindow(href){
newWindow=window.open(href,'upload','toolbar=no,scrollbars=yes,resizable=yes,status=yes,width=576,height=494');
newWindow.focus();
}