
if( !parent || !parent.WebPlayer ) {
  if(top!=self) {
    top.location = location; }
}

function HelpZone(TopicID) {
	var lngLeft = screen.width-300;
	var lngTop = 20;
	if (screen.availtop != null) {
		lngTop=screen.availtop;
	}
	var lngHeight=screen.height-lngTop-75;
	strSettings="left="+lngLeft+",top="+lngTop+",width=290,height="+lngHeight+",scrollbars=yes,resizable=yes";
	var _W=window.open('Help.asp?TID='+TopicID,'FormulaZone',strSettings);
	  _W.focus(); 
}

function AdClick(PartnerID) {
	var _W=window.open('ADirect.asp?PID='+PartnerID,'Advertisement',"");
	  _W.focus(); 
}

function Rate(RecipeID) {
	var lngLeft = screen.width-305;
	var lngTop = 20;
	if (screen.availtop != null) {
		lngTop=screen.availtop;
	}
	var lngHeight=screen.height-lngTop-75;
	strSettings="left="+lngLeft+",top="+lngTop+",width=295,height="+lngHeight+",scrollbars=yes,resizable=yes";
	var _W=window.open('Rate.asp?RID='+RecipeID,'FormulaZone',strSettings);
	  _W.focus(); 
}

function popUp(url) {
sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=500,height=450');
self.name = "mainWin";
}

function ZoneWindow(url) {
	var lngLeft = screen.width-289;
	var lngTop = 20;
	if (screen.availtop != null) {
		lngTop=screen.availtop;
	}
	var lngHeight=screen.height-lngTop-75;
	strSettings="left="+lngLeft+",top="+lngTop+",width=275,height="+lngHeight+",scrollbars=yes,resizable=yes";
	var _W=window.open(url,'FormulaZone',strSettings);
	  _W.focus(); 
}

function QuickWindow(strURL, lngWidth, lngHeight) {
	var lngLeft = screen.width-lngWidth;
	var lngLeft = lngLeft/2
	if (screen.availtop != null) {
		lngTop=screen.availtop;
	}
	strSettings="left="+lngLeft+",top=60,width="+lngWidth+",height="+lngHeight+",scrollbars=no,resizable=yes";
	var _W=window.open(strURL,'_blank',strSettings);
	  _W.focus(); 
}

function QuickScroll(strURL, lngWidth, lngHeight) {
	var lngLeft = screen.width-lngWidth;
	var lngLeft = lngLeft/2
	if (screen.availtop != null) {
		lngTop=screen.availtop;
	}
	strSettings="left="+lngLeft+",top=60,width="+lngWidth+",height="+lngHeight+",scrollbars=yes,resizable=yes";
	var _W=window.open(strURL,'_blank',strSettings);
	  _W.focus(); 
}


function QuickSearch(lngForm) {
	var theForm = window.document.forms[lngForm];
	var strPost = "?X=X";
	for(var i=0; i<theForm.length; i++)
    {
    var name = theForm.elements[i].name;
    var val = theForm.elements[i].value;
    strPost += "&" + name + "=" + val;
    }
	var lngLeft = screen.width-289;
	var lngTop = 20;
	if (screen.availtop != null) {
		lngTop=screen.availtop;
	}
	if (lngForm<2) {
	var lngHeight=screen.height-lngTop-75;
	strSettings="left="+lngLeft+",top="+lngTop+",width=275,height="+lngHeight+",scrollbars=yes,resizable=yes";
	var _W=window.open('Help.asp'+strPost,'_blank',strSettings);
	  _W.focus();
	 }
	if (lngForm==2) {
	var lngHeight=screen.height-lngTop-75;
	var _W=window.open('Forum.asp'+strPost,'_blank');
	  _W.focus();
	 }
}

function confirmDelete(itemName, delUrl) {
  if (confirm("Are you sure you want to delete the " + itemName + "?")) {
    document.location = delUrl;
  }
}

function toggleBox(szDivID, link) {
    if(document.layers) {  //NN4+
       document.layers[szDivID].visibility = (document.layers[szDivID].visibility == "hide") ? "show" : "hide";
    }
    else if(document.getElementById) {	  //gecko(NN6) + IE 5+
        var obj = document.getElementById(szDivID);
		obj.style.display = (obj.style.display != "block" && obj.style.display !="") ? "block" : "none";
		var el = document.getElementById(link);
		el.innerHTML = (obj.style.display != "block" && obj.style.display !="")  ? "+ show details" : "- hide details";
    }
    else if(document.all)  {	// IE 4
        document.all[szDivID].style.visibility = (document.all[szDivID].style.visibility == "hidden") ? "visible" : "hidden";
    }
}

function showBox(szDivID) {
	var el = document.getElementById(szDivID);
	el.style.display = "block";
}
