<!--  Flash Object Code  -->
/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;

<!--  Menu Switching -->
// JavaScript Document
/***********************************************
* Contractible Headers script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use. Last updated Mar 23rd, 2004.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var enablepersist="off" //Enable saving state of content structure using session cookies? (on/off)
var collapseprevious="yes" //Collapse previously open content when opening present? (yes/no)

if (document.getElementById){
document.write('<style type="text/css">')
document.write('.switchcontent{display:none;}')
document.write('</style>')
}

function getElementbyClass(classname){
ccollect=new Array()
var inc=0
var alltags=document.all? document.all : document.getElementsByTagName("*")
for (i=0; i<alltags.length; i++){
if (alltags[i].className==classname)
ccollect[inc++]=alltags[i]
}
}

function contractcontent(omit){
var inc=0
while (ccollect[inc]){
if (ccollect[inc].id!=omit)
ccollect[inc].style.display="none"
inc++
}
}

function expandcontent(cid){
if (typeof ccollect!="undefined"){
if (collapseprevious=="yes")
contractcontent(cid)
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"
}
//else {
//document.getElementById("default").style.display="blocked"
}

function revivecontent(){
contractcontent("omitnothing")
selectedItem=getselectedItem()
selectedComponents=selectedItem.split("|")
for (i=0; i<selectedComponents.length-1; i++)
document.getElementById(selectedComponents[i]).style.display="block"
}

function get_cookie(Name) { 
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { 
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function getselectedItem(){
if (get_cookie(window.location.pathname) != ""){
selectedItem=get_cookie(window.location.pathname)
return selectedItem
}
else
return ""
}

function saveswitchstate(){
var inc=0, selectedItem=""
while (ccollect[inc]){
if (ccollect[inc].style.display=="block")
selectedItem+=ccollect[inc].id+"|"
inc++
}

document.cookie=window.location.pathname+"="+selectedItem
}

function do_onload(){
uniqueidn=window.location.pathname+"firsttimeload"
getElementbyClass("switchcontent")
if (enablepersist=="on" && typeof ccollect!="undefined"){
document.cookie=(get_cookie(uniqueidn)=="")? uniqueidn+"=1" : uniqueidn+"=0" 
firsttimeload=(get_cookie(uniqueidn)==1)? 1 : 0 //check if this is 1st page load
if (!firsttimeload)
revivecontent()
}
}


if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload

if (enablepersist=="on" && document.getElementById)
window.onunload=saveswitchstate

<!--  Login Validation  -->
		   function LogInCheck() {
		
			if (document.forms.LogInform.username.value == "") {
				alert("Please enter your username.");
				document.forms.LogInform.username.focus();	
				return;
			}
			
			if (document.forms.LogInform.password.value == "") {
				alert("Please enter your password.");
				document.forms.LogInform.password.focus();
				return;	
			}
			document.forms.LogInform.submit();
		}			

		   function LogInCheck2() {
		
			if (document.forms.LogInform.username.value == "") {
				alert("Please enter your username.");
				document.forms.LogInform.username.focus();	
				return;
			}
			
			if (document.forms.LogInform.password.value == "") {
				alert("Please enter your password.");
				document.forms.LogInform.password.focus();
				return;	
			}

				alert("I'm sorry.  What you entered did not match any entries in our database.");
				document.forms.LogInform.username.focus();
		}			


function printMe()
{
	pfURL = 'print_recipe.html?SpotID=30&langID=0';
	var pfWindow = window.open (pfURL, 'pf', 'menubar=yes,resizable=yes,scrollbars=yes,status=yes,width=640,height=450');
}


<!--  Membership Page Validation  -->
		function echeck(str) {
		
				var at="@"
				var dot="."
				var lat=str.indexOf(at)
				var lstr=str.length
				var ldot=str.indexOf(dot)
				if (str.indexOf(at)==-1){
				   return false
				}
		
				if (str.indexOf(at)==-1 || str.indexOf(at)=="0" || str.indexOf(at)==lstr){
				   return false;
				}
		
				if (str.indexOf(dot)==-1 || str.indexOf(dot)=="0" || str.indexOf(dot)==lstr){
					return false;
				}
		
				 if (str.indexOf(at,(lat+1))!=-1){
					return false;
				 }
		
				 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
					return false;
				 }
		
				 if (str.indexOf(dot,(lat+2))==-1){
					return false;
				 }
				
				 if (str.indexOf(" ")!=-1){
					return false;
				 }
		
				 return true					
			}

		   function submitform1() {
		
			if (document.forms.Step1.FirstName.value == "") {
				alert("Please enter your first name.");
				document.forms.Step1.FirstName.focus();	
				return;
			}

			if (document.forms.Step1.LastName.value == "") {
				alert("Please enter your last name.");
				document.forms.Step1.LastName.focus();	
				return;
			}
			
			if (document.forms.Step1.Username.value == "") {
				alert("You must type a username!");
				document.forms.Step1.Username.focus();
				return;	
			}

			if (document.forms.Step1.Password.value == "") {
				alert("You must supply a password!");
				document.forms.Step1.Password.focus();
				return;	
			}

			if (document.forms.Step1.UserType.value == "") {
				alert("Please tells us what type of user you are.");
				document.forms.Step1.UserType.focus();
				return;	
			}

			if (document.forms.Step1.Email.value == "") {
				alert("You must supply an email address!");
				document.forms.Step1.Email.focus();
				return;	
			}

			if (echeck(document.forms.Step1.Email.value)==false){
				alert("Please enter a valid email address!");				
				document.forms.Step1.Email.focus();
				return;
			}
			
			document.forms.Step1.submit();
		}

		function checkCreditCard (cardnumber, cardname) {
			 
		  // Array to hold the permitted card characteristics
		  var cards = new Array();
		  var ccErrorNo = 0;
		  var ccErrors = new Array ()
			ccErrors [0] = "Unknown card type";
			ccErrors [1] = "No card number provided";
			ccErrors [2] = "Credit card number is in invalid format";
			ccErrors [3] = "Credit card number is invalid";
			ccErrors [4] = "Credit card number has an inappropriate number of digits";

		  // Define the cards we support. You may add addtional card types.
		  //  Name:      As in the selection box of the form - must be same as user's
		  //  Length:    List of possible valid lengths of the card number for the card
		  //  prefixes:  List of possible prefixes for the card
		  //  checkdigit Boolean to say whether there is a check digit
		  
		  cards [0] = {name: "Visa", 
					   length: "13,16", 
					   prefixes: "4",
					   checkdigit: true};
		  cards [1] = {name: "MasterCard", 
					   length: "16", 
					   prefixes: "51,52,53,54,55",
					   checkdigit: true};
		  cards [2] = {name: "DinersClub", 
					   length: "14,16", 
					   prefixes: "300,301,302,303,304,305,36,38,55",
					   checkdigit: true};
		  cards [3] = {name: "CarteBlanche", 
					   length: "14", 
					   prefixes: "300,301,302,303,304,305,36,38",
					   checkdigit: true};
		  cards [4] = {name: "AmEx", 
					   length: "15", 
					   prefixes: "34,37",
					   checkdigit: true};
		  cards [5] = {name: "Discover", 
					   length: "16", 
					   prefixes: "6011,650",
					   checkdigit: true};
		  cards [6] = {name: "JCB", 
					   length: "15,16", 
					   prefixes: "3,1800,2131",
					   checkdigit: true};
		  cards [7] = {name: "enRoute", 
					   length: "15", 
					   prefixes: "2014,2149",
					   checkdigit: true};
		  cards [8] = {name: "Solo", 
					   length: "16,18,19", 
					   prefixes: "6334, 6767",
					   checkdigit: true};
		  cards [9] = {name: "Switch", 
					   length: "16,18,19", 
					   prefixes: "4903,4905,4911,4936,564182,633110,6333,6759",
					   checkdigit: true};
		  cards [10] = {name: "Maestro", 
					   length: "16,18", 
					   prefixes: "5020,6",
					   checkdigit: true};
		  cards [11] = {name: "VisaElectron", 
					   length: "16", 
					   prefixes: "417500,4917,4913",
					   checkdigit: true};
					   
		  // Establish card type
		  var cardType = -1;
		  for (var i=0; i<cards.length; i++) {
		
			// See if it is this card (ignoring the case of the string)
			if (cardname.toLowerCase () == cards[i].name.toLowerCase()) {
			  cardType = i;
			  break;
			}
		  }
		  
		  // If card type not found, report an error
		  if (cardType == -1) {
			 ccErrorNo = 0;
			 alert ("The credit card number you provided does not match the card type you selected.");
			 return false; 
		  }
	   
		  // Ensure that the user has provided a credit card number
		  if (cardnumber.length == 0)  {
			 ccErrorNo = 1;
			 alert ("No card number provided");
			 return false; 
		  }
			
		  // Now remove any spaces from the credit card number
		  cardnumber = cardnumber.replace (/\s/g, "");
		  
		  // Check that the number is numeric
		  var cardNo = cardnumber
		  var cardexp = /^[0-9]{13,19}$/;
		  if (!cardexp.exec(cardNo))  {
			 ccErrorNo = 2;
			 alert ("Credit card number is in invalid format");
			 return false; 
		  }

		 // Now check the modulus 10 check digit - if required
		  if (cards[cardType].checkdigit) {
			var checksum = 0;                                  // running checksum total
			var mychar = "";                                   // next char to process
			var j = 1;                                         // takes value of 1 or 2
		  
			// Process each digit one by one starting at the right
			var calc;
			for (i = cardNo.length - 1; i >= 0; i--) {
			
			  // Extract the next digit and multiply by 1 or 2 on alternative digits.
			  calc = Number(cardNo.charAt(i)) * j;
			
			  // If the result is in two digits add 1 to the checksum total
			  if (calc > 9) {
				checksum = checksum + 1;
				calc = calc - 10;
			  }
			
			  // Add the units element to the checksum total
			  checksum = checksum + calc;
			
			  // Switch the value of j
			  if (j ==1) {j = 2} else {j = 1};
			} 
		  
			// All done - if checksum is divisible by 10, it is a valid modulus 10.
			// If not, report an error.
			if (checksum % 10 != 0)  {
			 ccErrorNo = 3;
			 alert ("Credit card number is invalid");
			 return false; 
			}
		  }  
 
		  // The following are the card-specific checks we undertake.
		  var LengthValid = false;
		  var PrefixValid = false; 
		  var undefined; 
		
		  // We use these for holding the valid lengths and prefixes of a card type
		  var prefix = new Array ();
		  var lengths = new Array ();
			
		  // Load an array with the valid prefixes for this card
		  prefix = cards[cardType].prefixes.split(",");
			  
		  // Now see if any of them match what we have in the card number
		  for (i=0; i<prefix.length; i++) {
			var exp = new RegExp ("^" + prefix[i]);
			if (exp.test (cardNo)) PrefixValid = true;
		  }
			  
		  // If it isn't a valid prefix there's no point at looking at the length
		  if (!PrefixValid) {
			 ccErrorNo = 3;
			 alert ("Credit card number is invalid");
			 return false; 
		  }
			
		  // See if the length is valid for this card
		  lengths = cards[cardType].length.split(",");
		  for (j=0; j<lengths.length; j++) {
			if (cardNo.length == lengths[j]) LengthValid = true;
		  }
		  
		  // See if all is OK by seeing if the length was valid. We only check the 
		  // length if all else was hunky dory.
		  if (!LengthValid) {
			 ccErrorNo = 4;
			 alert ("Credit card number has an inappropriate number of digits");
			 return false; 
		  };   
		  
		  // The credit card is in the required format.
		  return true;
		}

		   function submitform2() {

			if (document.forms.Step2.Address.value == "") {
				alert("Please include your address.");
				document.forms.Step2.Address.focus();	
				return;
			}

			if (document.forms.Step2.City.value == "") {
				alert("Please include your sity.");
				document.forms.Step2.City.focus();	
				return;
			}

			if (document.forms.Step2.State.value == "") {
				alert("You must include your state.");
				document.forms.Step2.State.focus();	
				return;
			}
			
			if (document.forms.Step2.Zip.value == "") {
				alert("Please include your zip.");
				document.forms.Step2.Zip.focus();
				return;	
			}

// Credit Card Info Verification
			if (document.forms.Step2.CardType.value == "") {
				alert("Please select your card type.");
				document.forms.Step2.CardType.focus();
				return;	
			}

			if (document.forms.Step2.CardFirstName.value == "") {
				alert("Please provide the first name on your credit card.");
				document.forms.Step2.CardFirstName.focus();
				return;	
			}

			if (document.forms.Step2.CardLastName.value == "") {
				alert("Please provide the last name on your credit card.");
				document.forms.Step2.CardLastName.focus();
				return;	
			}

			if (document.forms.Step2.CardNumber.value == "") {
				alert("Please provide your credit card number.");
				document.forms.Step2.CardNumber.focus();
				return;	
			}

			if (document.forms.Step2.CCV.value == "") {
				alert("Please provide the credit card verification number.");
				document.forms.Step2.CCV.focus();
				return;	
			}

			if (document.forms.Step2.ExpirationMonth.value == "") {
				alert("Please select the month of your card's expiration date.");
				document.forms.Step2.ExpirationMonth.focus();
				return;	
			}

			if (document.forms.Step2.ExpirationYear.value == "") {
				alert("Please select the year of your card's expiration date.");
				document.forms.Step2.ExpirationYear.focus();
				return;	
			}

			if (checkCreditCard(document.forms.Step2.CardNumber.value, document.forms.Step2.CardType.value)==false){
//				alert (ccErrors(ccErrorNo));
//				alert("Please enter a valid credit card number.");								
				document.forms.Step2.CardNumber.focus();
				return;	
		    }

			document.forms.Step2.submit();
		}	

		
<!--  Menu  -->
/***********************************************
* Pop-it menu- (c) Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var disappeardelay=350  //menu disappear speed onMouseout (in miliseconds)
var enableanchorlink=1 //Enable or disable the anchor link when clicked on? (1=e, 0=d)
var hidemenu_onclick=1 //hide menu when user clicks within menu? (1=yes, 0=no)
var horizontaloffset=1 //horizontal offset of menu from default location. (0-5 is a good value)

/////No further editting needed

var ie5=document.all
var ns6=document.getElementById&&!document.all

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function showhide(obj, e, visible, hidden){
if (ie5||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie5 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x-obj.offsetWidth < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetWidth+(horizontaloffset*2) //no space to the right of page? Move menu over to the left
}
else{
var topedge=ie5 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie5 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move menu up?
edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either? (position at top of viewable window then)
edgeoffset=dropmenuobj.y
}
}
return edgeoffset
}

function dropdownmenu(obj, e, dropmenuID){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
if (typeof dropmenuobj!="undefined") //hide previous menu
dropmenuobj.style.visibility="hidden"
clearhidemenu()
if (ie5||ns6){
obj.onmouseout=delayhidemenu
dropmenuobj=document.getElementById(dropmenuID)
if (hidemenu_onclick) dropmenuobj.onclick=function(){dropmenuobj.style.visibility='hidden'}
dropmenuobj.onmouseover=clearhidemenu
dropmenuobj.onmouseout=ie5? function(){ dynamichide(event)} : function(event){ dynamichide(event)}
showhide(dropmenuobj.style, e, "visible", "hidden")
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+obj.offsetWidth+horizontaloffset+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"px"
}
return clickreturnvalue()
}

function clickreturnvalue(){
if ((ie5||ns6) && !enableanchorlink) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie5&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function delayhidemenu(){
delayhide=setTimeout("dropmenuobj.style.visibility='hidden'",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}