// define functions to  SHOW/HIDE  Content

function HideContent(d) {
	document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
	document.getElementById(d).style.display = "block";
}
function ReverseDisplay(d) {
	if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
	else { document.getElementById(d).style.display = "none"; }
}


/*
function displayhiresearch() {
	document.write ('<tr><td>')
	document.write ('<table align="center" width="577" border="0" cellpadding="10" cellspacing="0" summary="Outlay table for hire search facility">')
	document.write ('<tr bgcolor="#e0dcdc"><td><img src="spacer.gif" width="10" height="20" alt=""></td><td><strong>I want:</strong>')
	document.write ('<img src="spacer.gif" width="7" height="20" alt="">')						
	document.write ('<form method="get" action="" name="hiresearch" id="hiresearch" style="display:inline;" onsubmit="gethiresearch(); return false;">')
	document.write ('<select size="1" name="servicedroplist" style="width:140px"><option value="" selected>Please Choose</option>')
														
	***********************************************************
	*                                                         *
	*            Start of SERVICES options            		  *
	*														  *
	***********************************************************
																												
	document.write ('<option value="Entertainment">Entertainment</option>')
	document.write ('<option value="Marquee Hire">Marquee Hire</option>')
	document.write ('<option value="Limo Hire">Limo Hire</option>')
	document.write ('<option value="Event Catering">Event Catering</option>')
	document.write ('<option value="Fancy Dress">Fancy Dress</option>')
	document.write ('<option value="Mobile Disco">Mobile Disco</option>')
	
	***********************************************************
	*                                                         *
	*            End of SERVICES options            		  *
	*														  *
	***********************************************************
																
	document.write ('</select><img src="spacer.gif" width="26" height="20" alt=""><strong>where:</strong><img src="spacer.gif" width="7" height="20" alt="">')
	document.write ('<select name="locationdroplist" size="1" style="width:140px"><option value="">Please Choose</option>')

	***********************************************************
	*                                                         *
	*            Start of LOCATIONS options            		  *
	*														  *
	***********************************************************
	
	
	document.write ('<option value="Avon">Avon</option>')
	document.write ('<option value="Berkshire">Berkshire</option>')
	document.write ('<option value="Birmingham">Birmingham</option>')
	document.write ('<option value="Brighton">Brighton</option>')
	document.write ('<option value="Bristol">Bristol</option>')	
	document.write ('<option value="Cambridge">Cambridge</option>')
	document.write ('<option value="Cardiff">Cardiff</option>')
	document.write ('<option value="Cheshire">Cheshire</option>')
	document.write ('<option value="Derbyshire">Derbyshire</option>')	
	document.write ('<option value="Edinburgh">Edinburgh</option>')
	document.write ('<option value="Glasgow">Glasgow</option>')
	document.write ('<option value="Hampshire">Hampshire</option>')
	document.write ('<option value="Herefordshire">Herefordshire</option>')
	document.write ('<option value="Lancashire">Lancashire</option>')
	document.write ('<option value="Leeds">Leeds</option>')
	document.write ('<option value="Leicestershire">Leicestershire</option>')
	document.write ('<option value="Liverpool">Liverpool</option>')
	document.write ('<option value="London">London</option>')
	document.write ('<option value="Manchester">Manchester</option>')
	document.write ('<option value="Nottinghamshire">Nottinghamshire</option>')
	document.write ('<option value="Oxfordshire">Oxfordshire</option>')
	document.write ('<option value="Staffordshire">Staffordshire</option>')
	document.write ('<option value="Southampton">Southampton</option>')
	document.write ('<option value="Warwickshire">Warwickshire</option>')
	document.write ('<option value="Worcestershire">Worcestershire</option>')
	document.write ('<option value="York">York</option>')	

	***********************************************************
	*                                                         *
	*            End of LOCATIONS options            		  *
	*														  *
	***********************************************************
	
	document.write ('</select><img src="spacer.gif" width="10" height="1" alt=""><input type="submit" style="width:50px" value="go" class="formbutton">')
	document.write ('</form></td></tr></table></td></tr>')
 }
 */

// Define function to check if Request More Information link is to be displayed - ** No longer in use TOS 22.07.09
/*  function checkrequestmoreinfo(emailaddress, client) {
	if (emailaddress != "") {
		document.write ("<a href='javascript:ShowPopUp(\"requestmoreinfo.php?email="+emailaddress+"&client="+client+"\",460,580)'>Click Here</a> for Enquiry Form" );
	}
}
*/

// define function to validate Request More Information form
function valfurtherinfo(client) {
	if (document.forms) {
		if (document.forms["frmfurtherinfo"].name.value.length == 0) {
			alert("You must enter your Name in the field provided.");
			document.forms["frmfurtherinfo"].name.focus();
			return false;
		}
		if (document.forms["frmfurtherinfo"].address_line_1.value.length == 0) {
			alert("You must enter your Address in the field provided.");
			document.forms["frmfurtherinfo"].address_line_1.focus();
			return false;
		}
		if (document.forms["frmfurtherinfo"].postcode.value.length == 0) {
			alert("You must enter your Postcode in the field provided.");
			document.forms["frmfurtherinfo"].postcode.focus();
			return false;
		}
		if (document.forms["frmfurtherinfo"].telephone.value.length == 0) {
			alert("You must enter your Telephone No. in the field provided.");
			document.forms["frmfurtherinfo"].telephone.focus();
			return false;
		}
		if (document.forms["frmfurtherinfo"].mobile.value.length == 0) {
			alert("You must enter your Mobile No. in the field provided.");
			document.forms["frmfurtherinfo"].mobile.focus();
			return false;
		}
		if (!doValidateMail(document.forms["frmfurtherinfo"].email)) {
			document.forms["frmfurtherinfo"].email.select();
			document.forms["frmfurtherinfo"].email.focus();
			return false;			
		}
		if (client == "Enjoy") {
			if (document.forms["frmfurtherinfo"].apparatus.value.length == 0) {
				alert("You must specify the Apparatus of interest in the field provided.");
				document.forms["frmfurtherinfo"].apparatus.focus();
				return false;
			}
		}
		if (document.forms["frmfurtherinfo"].date_of_event.value.length == 0) {
			alert("You must enter the Date of your event in the field provided.");
			document.forms["frmfurtherinfo"].date_of_event.focus();
			return false;
		}
		if (document.forms["frmfurtherinfo"].other_information.value.length == 0) {
			alert("You must enter Other Information in the field provided.");
			document.forms["frmfurtherinfo"].other_information.focus();
			return false;
		}
		return true;
	} 
}	
 //Define the email address validation function
	function doValidateMail(field) {
	var email = field.value;
	var invalid_chars = " /:,;";
	if (email == "") {
		alert("You must enter an email address in the field provided.");			
		return false;
	}
	for (var i = 0;i < invalid_chars.length;i++) {
		bad_char = invalid_chars.charAt(i);
		if (email.indexOf(bad_char,0) > -1) {
			alert("You cannot enter blank space, slash, colon, comma or semicolon characters in an email address.");
			field.focus();
			field.select();
			return false;
		}
	}
	at_pos = email.indexOf("@",1);
	if (at_pos == -1) {
		alert("You must include the @ character in an email address.");
		field.focus();
		field.select();
		return false;
	}
	if (email.indexOf("@",at_pos + 1) > -1) {
		alert("You must have only one @ character in an email address.");
		field.focus();
		field.select();
		return false;
	}
	period_pos = email.indexOf(".",at_pos);
	if (period_pos == -1) {
		alert("You must include the domain extension (ie .com, .co.uk) in an email address.");
		field.focus();
		field.select();
		return false;
	}
	if (period_pos + 3 > email.length) {
		alert("You have entered an invalid domain extension in the email address.");
		field.focus();
		field.select();
		return false;
	}
	return true;
}	

// define AJAX function for use in GetEventSearch function - see http://www.xul.fr/ajax/ajax-demo-exists.html
function createXHR() 
{
    var request = false;
        try {
            request = new ActiveXObject('Msxml2.XMLHTTP');
        }
        catch (err2) {
            try {
                request = new ActiveXObject('Microsoft.XMLHTTP');
            }
            catch (err3) {
		try {
			request = new XMLHttpRequest();
		}
		catch (err1) 
		{
			request = false;
		}
            }
        }
    return request;
}

// define function to search for EVENT PRODUCTS in specified LOCATIONS
function GetEventSearch(EnjoyDir) {
	if (document.forms) {
	var product = document.forms["EventSearch"].Product.value;
	var location = document.forms["EventSearch"].Location.value;
		if (product == "" || location == "") {
			alert("Please choose a Product and a Location");
			document.forms["EventSearch"].Product.focus();
			return false;
		} else {
			var product2 = product.replace(/ /g, "_");
			var location2 = location.replace(/ /g, "_");
			if (EnjoyDir == "acatalog") {
				var url = ""+EnjoyDir+"/"+location2+"_"+product2+"_Hire.html";
			} else {
				var url = ""+location2+"_"+product2+"_Hire.html";
			}
			xhr=createXHR();
			document.getElementById("EventSearchInfo").innerHTML="<div id=\"EventSearchInfoInsert\">Started...</div>";
			xhr.open("HEAD", url, true);
			xhr.onreadystatechange=function() {
				document.getElementById("EventSearchInfo").innerHTML="<div id=\"EventSearchInfoInsert\">Wait server...</div>";
				if(xhr.readyState == 4) {
				
					if (xhr.status == 200) {
						value = "<div id=\"EventSearchInfoInsert\">"+product+" found in "+location+"...transferring...</div>";
						window.location.href = url;
					} else {
					if(xhr.status==404 || xhr.status==500)
						value = "<div id=\"EventSearchInfoInsert\">Sorry, we do not provide "+product+" in "+location+". Please try again...</div>";
					else
						value = "Error, status is " + xhr.status;
					}
				}
				document.getElementById("EventSearchInfo").innerHTML=value;
			}
		}
		xhr.send(null);
	} 
}
	
// define function to search for SERVICES in specified LOCATIONS
	function gethiresearch() {
		if (document.forms) {
			if (document.forms["hiresearch"].servicedroplist.value == "" || document.forms["hiresearch"].locationdroplist.value == "") {
				alert("Please choose a Hire Service and a location");
				document.forms["hiresearch"].servicedroplist.focus();
				return false;
			} else {
				var getservice = document.hiresearch.servicedroplist.options[document.hiresearch.servicedroplist.selectedIndex].value;
				var getlocation = document.hiresearch.locationdroplist.options[document.hiresearch.locationdroplist.selectedIndex].value;
				location.href = "http://www.enjoy.co.uk/cgi-bin/ss000001.pl?PAGE=SEARCH&SN=2&S_DEPARTMENT0_1="+getservice+"&S_LOCATION10_2="+getlocation+"&S_LOCATION20_3="+getlocation+"&S_LOCATION30_4="+getlocation+"&S_LOCATION40_5="+getlocation+"&S_LOCATION50_6="+getlocation+"&S_NATIONWIDE0_7=Yes&ACTION=Search";
			}
				return true;
		} 
	}

// define function to check that gift type and /or price range has been chosen
	function valgiftprice() {
		if (document.forms) {
			if (document.forms["giftfinder"].S_GIFTFINDER0_0.value == "" && document.forms["giftfinder"].PR.value == "-1") {
				alert("Please choose a Gift Type or Price Range.");
				document.forms["giftfinder"].S_GIFTFINDER0_0.focus();
				return false;
			}	
			return true;
		} 
	}
// Define function to search for gifts based on gender/generation
function getgiftfinder() {
	var whofor = document.giftfinder.droplist.options[document.giftfinder.droplist.selectedIndex].value;
	if (whofor != "") {
		location.href = "http://www.enjoy.co.uk/cgi-bin/ss000001.pl?RANDOM=NETQUOTEVAR%3ARANDOM&SS=&TB=A&S_GIFTFINDER0_0="+whofor+"&S_BRAND0_1=&GB=O&giftforwho="+whofor+"&ACTION=Search";
	}
}
// Define function to search enjoy or web
function getsearchtype() {
	for (i=0;i<document.forms["searchtype"].choosesearch.length;i++)
	{
		if (document.forms["searchtype"].choosesearch[i].checked)
		{
			userchoice = document.forms["searchtype"].choosesearch[i].value;
		}
	}
		searchtextstring = document.forms["searchtype"].searchtext.value;
		
	if (userchoice == "enjoy") {
			location.href = "http://www.enjoy.co.uk/cgi-bin/ss000001.pl?SS="+searchtextstring+"&action=search&PR=-1&TB=A&SHOP=";
		} else {
			location.href = "http://www.enjoy.co.uk/scripts/noxslt.php?Keywords="+searchtextstring+"";
		}
}
// Define function to check left side images to display based on search criteria
function checkdisplayimageleft(customvar) {
	if (Request.QueryString("S_GIFTFINDER0_0").Count > 0) {
		if (Request.QueryString("S_GIFTFINDER0_0").Item(1) != "") {
			gift = Request.QueryString("S_GIFTFINDER0_0").Item(1);
			priceband = Request.QueryString("PR").Item(1);
			displayimage(gift,"header_l"+priceband+"","gif",310,42);
		} else { 
			if (Request.QueryString("PR").Item(1) != "") {
			priceband = Request.QueryString("PR").Item(1);
			displayimage("price","header_l"+priceband+"","gif",310,42);
			}
		}
	} else if (Request.QueryString("S_DEPARTMENT0_1").Count > 0) {
		if (Request.QueryString("S_DEPARTMENT0_1").Item(1) != "") {
		headservice = Request.QueryString("S_DEPARTMENT0_1").Item(1);
		displayimage(headservice,"header_l","gif",310,42);
		}
	} else {
			displayimage(customvar,"product","gif",414,42);
	}
}
// Define function to check right side images to display based on search criteria
function checkdisplayimageright(customvar) {
	if (Request.QueryString("S_GIFTFINDER0_0").Count > 0) {
		if (Request.QueryString("S_GIFTFINDER0_0").Item(1) != "") {
			gift = Request.QueryString("S_GIFTFINDER0_0").Item(1);
			displayimage(gift,"header_r","gif",263,42);
		} else { 
			if (Request.QueryString("PR").Item(1) != "") {
			displayimage("price","header_r","gif",263,42);
			}
		}
		} else if (Request.QueryString("S_LOCATION10_2").Count > 0) {
			if (Request.QueryString("S_LOCATION0_2").Item(1) != "") {
			servicelocation = Request.QueryString("S_LOCATION10_2").Item(1);
			displayimage(servicelocation,"header_r","gif",263,42);
			}
		} else {
			displayimage(customvar,"brand","gif",159,42);
		}
	}	
// Define function to display customvar images
function displayimage(customvar, where, type, width, height) {
	if (customvar != "") {
		var customvar1=customvar.replace(/ /g,"");
		customvar1=customvar1.toLowerCase();
		var customvar2=customvar.replace(/ /g,"_");
		if (where == "product") {
			document.write('<a href="http://www.enjoy.co.uk/acatalog/'+customvar2+'.html"><img src="'+customvar1+'_'+where+'.'+type+'" width="'+width+'" height="'+height+'" border="0" alt="Back to the '+customvar+' section"></a>');
			} else {
			document.write('<img src="'+customvar1+'_'+where+'.'+type+'" width="'+width+'" height="'+height+'" border="0" alt="'+customvar+'">');
			}
		} else {
		document.write('<img src="spacer.gif" width="'+width+'" height="21" border="0" alt="">');
	}
}
// Define function to display this year
function getThisYear(){
	var dNow = new Date()
	var year = dNow.getFullYear();
	document.write(year)
}
// define MM functions
function findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function swapImage() { //v3.0
  var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function swapImgRestore() { //v3.0
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.p) d.p=new Array();
   var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}
function displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.returnValue = true;
}
function ReloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.pgW=innerWidth; document.pgH=innerHeight; onresize=ReloadPage; }}
  else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
}
//** Chrome Drop Down Menu- Author: Dynamic Drive (http://www.dynamicdrive.com)

//** Updated: July 14th 06' to v2.0
	//1) Ability to "left", "center", or "right" align the menu items easily, just by modifying the CSS property "text-align".
	//2) Added an optional "swipe down" transitional effect for revealing the drop down menus.
	//3) Support for multiple Chrome menus on the same page.

//** Updated: Nov 14th 06' to v2.01- added iframe shim technique

//** Updated: July 23rd, 08 to v2.4
	//1) Main menu items now remain "selected" (CSS class "selected" applied) when user moves mouse into corresponding drop down menu. 
	//2) Adds ability to specify arbitrary HTML that gets added to the end of each menu item that carries a drop down menu (ie: a down arrow image).
	//3) All event handlers added to the menu are now unobstrusive, allowing you to define your own "onmouseover" or "onclick" events on the menu items.
	//4) Fixed elusive JS error in FF that sometimes occurs when mouse quickly moves between main menu items and drop down menus


var cssdropdown={
disappeardelay: 250, //set delay in miliseconds before menu disappears onmouseout
dropdownindicator: '', //specify full HTML to add to end of each menu item with a drop down menu
enableswipe: 1, //enable swipe effect? 1 for yes, 0 for no
enableiframeshim: 1, //enable "iframe shim" in IE5.5/IE6? (1=yes, 0=no)

//No need to edit beyond here////////////////////////

dropmenuobj: null, asscmenuitem: null, domsupport: document.all || document.getElementById, standardbody: null, iframeshimadded: false, swipetimer: undefined, bottomclip:0,

getposOffset:function(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;
},

swipeeffect:function(){
	if (this.bottomclip<parseInt(this.dropmenuobj.offsetHeight)){
		this.bottomclip+=10+(this.bottomclip/10) //unclip drop down menu visibility gradually
		this.dropmenuobj.style.clip="rect(0 auto "+this.bottomclip+"px 0)"
	}
	else
		return
	this.swipetimer=setTimeout("cssdropdown.swipeeffect()", 10)
},

css:function(el, targetclass, action){
	var needle=new RegExp("(^|\\s+)"+targetclass+"($|\\s+)", "ig")
	if (action=="check")
		return needle.test(el.className)
	else if (action=="remove")
		el.className=el.className.replace(needle, "")
	else if (action=="add" && !needle.test(el.className))
		el.className+=" "+targetclass
},

showhide:function(obj, e){
	this.dropmenuobj.style.left=this.dropmenuobj.style.top="-500px"
	if (this.enableswipe==1){
		if (typeof this.swipetimer!="undefined")
			clearTimeout(this.swipetimer)
		obj.clip="rect(0 auto 0 0)" //hide menu via clipping
		this.bottomclip=0
		this.swipeeffect()
	}
	obj.visibility="visible"
	this.css(this.asscmenuitem, "selected", "add")
},

clearbrowseredge:function(obj, whichedge){
	var edgeoffset=0
	if (whichedge=="rightedge"){
		var windowedge=document.all && !window.opera? this.standardbody.scrollLeft+this.standardbody.clientWidth-15 : window.pageXOffset+window.innerWidth-15
		this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetWidth
		if (windowedge-this.dropmenuobj.x < this.dropmenuobj.contentmeasure)  //move menu to the left?
			edgeoffset=this.dropmenuobj.contentmeasure-obj.offsetWidth
	}
	else{
		var topedge=document.all && !window.opera? this.standardbody.scrollTop : window.pageYOffset
		var windowedge=document.all && !window.opera? this.standardbody.scrollTop+this.standardbody.clientHeight-15 : window.pageYOffset+window.innerHeight-18
		this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetHeight
		if (windowedge-this.dropmenuobj.y < this.dropmenuobj.contentmeasure){ //move up?
			edgeoffset=this.dropmenuobj.contentmeasure+obj.offsetHeight
			if ((this.dropmenuobj.y-topedge)<this.dropmenuobj.contentmeasure) //up no good either?
				edgeoffset=this.dropmenuobj.y+obj.offsetHeight-topedge
		}
	}
	return edgeoffset
},

dropit:function(obj, e, dropmenuID){
	if (this.dropmenuobj!=null) //hide previous menu
		this.hidemenu() //hide menu
	this.clearhidemenu()
	this.dropmenuobj=document.getElementById(dropmenuID) //reference drop down menu
	this.asscmenuitem=obj //reference associated menu item
	this.showhide(this.dropmenuobj.style, e)
	this.dropmenuobj.x=this.getposOffset(obj, "left")
	this.dropmenuobj.y=this.getposOffset(obj, "top")
	this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+"px"
	this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1+"px"
	this.positionshim() //call iframe shim function
},

positionshim:function(){ //display iframe shim function
	if (this.enableiframeshim && typeof this.shimobject!="undefined"){
		if (this.dropmenuobj.style.visibility=="visible"){
			this.shimobject.style.width=this.dropmenuobj.offsetWidth+"px"
			this.shimobject.style.height=this.dropmenuobj.offsetHeight+"px"
			this.shimobject.style.left=this.dropmenuobj.style.left
			this.shimobject.style.top=this.dropmenuobj.style.top
		}
	this.shimobject.style.display=(this.dropmenuobj.style.visibility=="visible")? "block" : "none"
	}
},

hideshim:function(){
	if (this.enableiframeshim && typeof this.shimobject!="undefined")
		this.shimobject.style.display='none'
},

isContained:function(m, e){
	var e=window.event || e
	var c=e.relatedTarget || ((e.type=="mouseover")? e.fromElement : e.toElement)
	while (c && c!=m)try {c=c.parentNode} catch(e){c=m}
	if (c==m)
		return true
	else
		return false
},

dynamichide:function(m, e){
	if (!this.isContained(m, e)){
		this.delayhidemenu()
	}
},

delayhidemenu:function(){
	this.delayhide=setTimeout("cssdropdown.hidemenu()", this.disappeardelay) //hide menu
},

hidemenu:function(){
	this.css(this.asscmenuitem, "selected", "remove")
	this.dropmenuobj.style.visibility='hidden'
	this.dropmenuobj.style.left=this.dropmenuobj.style.top=0
	this.hideshim()
},

clearhidemenu:function(){
	if (this.delayhide!="undefined")
		clearTimeout(this.delayhide)
},

addEvent:function(target, functionref, tasktype){
	if (target.addEventListener)
		target.addEventListener(tasktype, functionref, false);
	else if (target.attachEvent)
		target.attachEvent('on'+tasktype, function(){return functionref.call(target, window.event)});
},

startchrome:function(){
	if (!this.domsupport)
		return
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
	for (var ids=0; ids<arguments.length; ids++){
		var menuitems=document.getElementById(arguments[ids]).getElementsByTagName("a")
		for (var i=0; i<menuitems.length; i++){
			if (menuitems[i].getAttribute("rel")){
				var relvalue=menuitems[i].getAttribute("rel")
				var asscdropdownmenu=document.getElementById(relvalue)
				this.addEvent(asscdropdownmenu, function(){cssdropdown.clearhidemenu()}, "mouseover")
				this.addEvent(asscdropdownmenu, function(e){cssdropdown.dynamichide(this, e)}, "mouseout")
				this.addEvent(asscdropdownmenu, function(){cssdropdown.delayhidemenu()}, "click")
				try{
					menuitems[i].innerHTML=menuitems[i].innerHTML+" "+this.dropdownindicator
				}catch(e){}
				this.addEvent(menuitems[i], function(e){ //show drop down menu when main menu items are mouse over-ed
					if (!cssdropdown.isContained(this, e)){
						var evtobj=window.event || e
						cssdropdown.dropit(this, evtobj, this.getAttribute("rel"))
					}
				}, "mouseover")
				this.addEvent(menuitems[i], function(e){cssdropdown.dynamichide(this, e)}, "mouseout") //hide drop down menu when main menu items are mouse out
				this.addEvent(menuitems[i], function(){cssdropdown.delayhidemenu()}, "click") //hide drop down menu when main menu items are clicked on
			}
		} //end inner for
	} //end outer for
	if (window.createPopup && !window.XmlHttpRequest &&!this.iframeshimadded){ //if IE5.5 to IE6, create iframe for iframe shim technique
		document.write('<IFRAME id="iframeshim"  src="" style="display: none; left: 0; top: 0; z-index: 90; position: absolute; filter: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)" frameBorder="0" scrolling="no"></IFRAME>')
		this.shimobject=document.getElementById("iframeshim") //reference iframe object
		this.iframeshimadded=true
	}
} //end startchrome

}
