
//if (self.parent.frames.length != 0){
//	self.parent.location="http://www.lacie.com";
//}
/* <![CDATA[ */
//global scope variables
var _active = 0;

w3c = (document.getElementById)? true:false;
if (w3c) {
	ns4 = false;
	ie4 = false;
}
else if (!w3c) {
	ns4 = (document.layers)? true:false;
	ie4 = (document.all)? true:false;
}

var hideMenu = null;
var hideCountries = null;

if (w3c || ie4 || ns4) 	browserOK = true;
 
function rollon() { 	
		clearTimeout(hideMenu);
}

function rolloff(){
	if (!ns4) hideMenu=setTimeout('hideAll()',400);
}



function menu_rollon(){
			clearTimeout(hideMenu);
}

function menu_rolloff(){
	hideMenu=setTimeout('hideAll()',400);
}

function toggle(id){
	if ((w3c && document.getElementById(id).style.visibility == '') || (ie4 && document.all[id].style.visibility == '')){
		showLayer(id);
	}
	else if (w3c && document.getElementById(id).style.visibility == "hidden"){
		showLayer(id)
	}
	else if (w3c && document.getElementById(id).style.visibility == "visible"){
		hide(id);
	}
	else if (ie4 && document.all[id].style.visibility == "hidden"){
		showLayer(id);
	}
	else if (ie4 && document.all[id].style.visibility == "visible"){
		hide(id);
	}
}
function cleartimer(){
	clearTimeout(hideMenu);
}

function starttimer(id){
	hideMenu=setTimeout('hideAll()',100);
}


//turns object visibility off/on
function show(id) {
		hide(nexthide); //hide previous layer
		nexthide = id; //set var to this layer for next time
		showLayer(id); //do the css property change
}

function showLayer(id){
	if (w3c) {
		document.getElementById(id).style.visibility = "visible";
		if (id == 'products-menu'){
		
		document.getElementById(id).style.height = '225px';
		
		}
	}
	else if (ie4) document.all[id].style.visibility = "visible";
}

function hide(id) {        
        if (w3c) document.getElementById(id).style.visibility = "hidden";
		else if (ie4) document.all[id].style.visibility = "hidden";
}

function clearall() {
		hide(nexthide);
}



// for popup windows
function popup(url,features){
	var curPopupWindow;
	curPopupWindow = window.open(url, 'popupWindow', features, false);
	curPopupWindow.focus();
}

//for tab pages - my account, product pages
var panels = new Array('panel1');
  var selectedTab = null;
  function showPanel(tab, name)	
  {
	if (selectedTab) selectedTab.style.color = '#ffffff';
	
	selectedTab = tab;
	selectedTab.style.color = '#036';
	
	for(i = 0; i < panels.length; i++)
	{
		if (document.getElementById(panels[i]))
		{
			document.getElementById(panels[i]).style.display = (name == panels[i]) ? 'block':'none';
		}
	}
	return false;
  }
  
  function hoverColor(thisTab, thisColor){
  	if (selectedTab != thisTab) {
  		thisTab.style.color=thisColor;  
	}
	thisTab.style.cursor='pointer';
  }
  //used in support_manifest.htm and basket.htm
  function expando(theBox, expandoheight){
	if (document.getElementById(theBox).style.visibility == "visible"){
		document.getElementById(theBox).style.visibility = "hidden";
		document.getElementById(theBox).style.height = "1px";
	}
	else {
		document.getElementById(theBox).style.visibility = "visible";
		document.getElementById(theBox).style.height = expandoheight;
	}
}
 /* ]]> */
