var PulldownVisible="";
var HidePDiv;

function HideAllCombo(){
	var coll = document.all.tags("SELECT");
	var nComboMax;
	if (coll.length > 12)
		nComboMax = 12;
	else
		nComboMax =coll.length;
		
	for (var k =1; k< nComboMax;k++)
		coll[k].style.visibility="hidden";
}

function ShowAllCombo() {
var coll = document.all.tags("SELECT");
for (var k =0; k< coll.length;k++)
	coll[k].style.visibility="visible";
}

function RestoreMenu(){
	if (typeof PulldownVisible !="undefined" && navigator.appName=="Microsoft Internet Explorer" && parseInt(navigator.appVersion) >=4 ){
		if (PulldownVisible !=""){
			if (document.all.item(PulldownVisible)!=null)
				document.all.item(PulldownVisible).style.display="none"
//			if (document.all.item("TypeSearch") !=null)
				ShowAllCombo();
			PulldownVisible="";
			var strMenuName ;
			for (var j=1;j<=9;++j){			
				strMenuName = "MenuItem" + j;
				if (document.all.item(strMenuName) !=null)
					document.all.item(strMenuName).style.background="black"
				
				if (document.all.item(strMenuName)!=null)
					document.all.item(strMenuName).style.color="white"
			}
		}
	}
	
	if (typeof HidePDiv !="undefined" && navigator.appName=="Microsoft Internet Explorer" && parseInt(navigator.appVersion) >=4 ){
		if (HidePDiv=="True"){
			if (document.all.item("PowerNav")!=null){
				document.all.item("PowerNav").style.display="none";
				HidePDiv="";
			}
			if (document.all.item("TypeSearch") !=null) 				
				document.all.item("TypeSearch").style.visibility="visible";
		}
	}
}

function OpenWin(strOpenWin){
	if (strOpenWin !="")
		document.location = strOpenWin;
}

function ShowDiv(strMenuId){
	if (PulldownVisible != strMenuId && PulldownVisible!="" ){
		document.all.item(PulldownVisible).style.display="none";
		if (document.all.item("PowerNav")!=null)
			document.all.item("PowerNav").style.display="none";
		document.all.item(strMenuId).style.display="";
	}
	if (PulldownVisible=="" && PulldownVisible!="SubMenu1"){
		if (document.all.item("PowerNav")!=null)
			document.all.item("PowerNav").style.display="none";
		document.all.item(strMenuId).style.display="";
	}
	PulldownVisible=strMenuId;	
	window.event.cancelBubble = true;
}

function HideDiv(strMenuId){
	document.all.item(strMenuId).style.display="none";
	PulldownVisible=""
}

function SetDefaultColor(){
	var strMenuName="MenuItem";
	for( var j=1;j<=9;j++){
		strMenuName = "MenuItem" +  j;
		document.all.item(strMenuName).style.background="black"
		document.all.item(strMenuName).style.color="white"
	}
}

function ShowDivNSwitchColor(strDiv){
	var temparr = new Array();
	temparr=strDiv.split("|");
	
	if (PulldownVisible == temparr[0]){
		window.event.cancelBubble = true;
		return;
	}
	SetDefaultColor()
	ShowDiv (temparr[0]);
	
  // this line recoded 7/23/99 to hide combo and list boxes 
  // for SubMenus 4 through 10 instead of just 4 through 9	
  //if(parseInt(temparr[0].charAt(7))>=4 &&  temparr[0]!="SubMenu1" )
    if(parseInt(temparr[0].charAt(7))>=4 || temparr[0] == "SubMenu10")

		HideAllCombo();
	
	if(temparr[0]=="SubMenu2" ||  temparr[0]=="SubMenu1" ){
	if (document.all.item("TypeSearch") !=null) {
		//alert(document.all.item("TypeSearch"));
		document.all.item("TypeSearch").style.visibility="hidden";
	}
	}
	document.all.item(temparr[1]).style.background=temparr[2] 
	document.all.item(temparr[1]).style.color=temparr[3]
}

function ShowBackColor(strDiv){
	document.all.item(strDiv).style.backgroundColor="black" 
	document.all.item(strDiv).style.color="white"
	window.event.cancelBubble = true;
}

function ShowOldColor(strDiv){
	var temparr = new Array();
	temparr=strDiv.split("|");
	document.all.item(temparr[0]).style.background=temparr[1];
	document.all.item(temparr[0]).style.color=temparr[2];
	window.event.cancelBubble = true
}

function ShowPNav(){
	if (document.all.item("PowerNav") !=null) {
		document.all.item("PowerNav").style.top = 10 + (195 - window.event.clientY);
		document.all.item("PowerNav").style.display="";
		if (document.all.item("TypeSearch") !=null)
			document.all.item("TypeSearch").style.visibility="hidden";
	}
}

function ShowOldPColor(strCell) {
	if (document.all.item("PowerNav") !=null) {
		document.all.item(strCell).style.background = document.all.item("PowerNav").style.background  ;
		document.all.item(strCell).style.color = document.all.item("PowerNav").style.color  ;
		window.event.cancelBubble =true;
	}
}

function HidePnav(){
	if (document.all.item("PowerNav") !=null) 
		document.all.item("PowerNav").style.display="none";
}

function SetVar() {
	HidePDiv = "False";
	window.event.cancelBubble = true;
}

function ShowBackColorPNav(strDiv){
	document.all.item(strDiv).style.backgroundColor="black" 
	document.all.item(strDiv).style.color="white";
	HidePDiv = "True";
	window.event.cancelBubble = true;
}

function ShowReseller(strRes)
{
	if (confirm("You are about to leave the Diskeeper Corporation website. Click OK to proceed."))
	{
		window.location = strRes; 
		return true;
	}
	return false;
}