
///////////barb

///////////variable arrays
var retail_locationsX = ["<tr><td width=\'100%\' valign=\'top\'><b>Lightolier</b><br>2965 S Maryland Pkwy<br>Las Vegas, NV 89109<br>(702) 253-7815</td></tr>", "<tr><td width=\'100%\' valign=\'top\'><b>Nimbus Gallery</b><br>25 E Main Street<br>Ashland, OR 97520<br>(541) 482-3621</td></tr>", "<tr><td width=\'100%\' valign=\'top\'><b>Lighting Solutions</b><br>11780 Metro Pkwy<br>Fort Myers, FL 33912<br>(239) 939-6900</td></tr>", "<tr><td width=\'100%\' valign=\'top\'><b>Escent Lighting Gallery</b><br>W 605 Spokane Falls Blvd<br>Spokane, WA 99201<br>(509) 838-9028<br><a href=\"http://www.escent-ltg.com\" target='_blank'>www.Escent-Ltg.com</a></td></tr>", "<tr><td width=\'100%\' valign=\'top\'><b>Cest La Vie</b><br>320 5th Avenue S<br>Edmonds, WA 98020<br>(877) 548-4506<br><a href=\"http://www.clvcatalog.com\" target='_blank'>www.CLVcatalog.com</a></td></tr>", "<tr><td width=\'100%\' valign=\'top\'><b>Studio 7 Fine Arts</b><br>77 West Angela Street<br>Pleasanton, CA 94566<br>(925) 846-4322<br><a href='http://www.studio7finearts.com' target='_blank'>www.studio7finearts.com</a></td></tr>", "<tr><td width=\'100%\' valign=\'top\'><b>Red Oak Glass</b><br>234 N Front Street<br>Central Point, OR 97502<br>(541) 665-0423<br><a href='mailto:redoakglass@gmail.com'>RedOakGlass@gmail.com</a></td></tr>"];

var retail_locations = ["<tr><td width=\'100%\' align=\'left\' valign=\'top\'><b>Lightolier</b><br>2965 S Maryland Pkwy<br>Las Vegas, NV 89109<br>(702) 253-7815</td></tr>", "<tr><td width=\'100%\' align=\'left\' valign=\'top\'><b>Woodland Lighting &amp; Design</b><br>735 Commercial St<br>Klamath Falls, OR 97601<br>(541) 273-7495</td></tr>", "<tr><td width=\'100%\' align=\'left\' valign=\'top\'><b>Nimbus Gallery</b><br>25 E Main Street<br>Ashland, OR 97520<br>(541) 482-3621</td></tr>", "<tr><td width=\'100%\' align=\'left\' valign=\'top\'><b>Lighting Solutions</b><br>11780 Metro Pkwy<br>Fort Myers, FL 33912<br>(239) 939-6900</td></tr>", "<tr><td width=\'100%\' align=\'left\' valign=\'top\'><b>Escent Lighting Gallery</b><br>W 605 Spokane Falls Blvd<br>Spokane, WA 99201<br>(509) 838-9028<br><a href=\"http://www.escent-ltg.com\" target='_blank'>www.Escent-Ltg.com</a></td></tr>", "<tr><td width=\'100%\' align=\'left\' valign=\'top\'><b>Cest La Vie</b><br>320 5th Avenue S<br>Edmonds, WA 98020<br>(877) 548-4506<br><a href=\"http://www.clvcatalog.com\" target='_blank'>www.CLVcatalog.com</a></td></tr>", "<tr><td width=\'100%\' align=\'left\' valign=\'top\'><b>Studio 7 Fine Arts</b><br>77 West Angela Street<br>Pleasanton, CA 94566<br>(925) 846-4322<br><a href='http://www.studio7finearts.com' target='_blank'>www.studio7finearts.com</a></td></tr>", "<tr><td width=\'100%\' align=\'left\' valign=\'top\'><b>Red Oak Glass</b><br>234 N Front Street<br>Central Point, OR 97502<br>(541) 665-0423<br><a href='mailto:redoakglass@gmail.com'>RedOakGlass@gmail.com</a></td></tr>"];

var retail_zips = ["891,923,864,890", "975,976,960,961,977","975,960,961,974,976,977", "329,330,331,334,336,337,338,339,341,347,349", "835,838,988,990,991,992", "980,982,983,984,985,988", "936,940,945,949,950,951,953,955,956,957,958","975,955,960,961,974,976,977" ];


var upcoming_shows = "<font color='red'><b>2010</b></font><br>March 20<br><b><a href='http://www.roguecreamery.com/pilot.asp?pg=OCG2010-FEST'>6th Annual Oregon Cheese Festival</a></b><br>Rogue Creamery (Right across the street from Red Oak Glass!)<br>311 N Front St<br>Central Point, Oregon<p><p>March 27 - 28<br><b><a href='http://www.nwartalliance.com/events/Spring_Best_of_the_Northwest/'>Best of the Northwest</a></b><br>Warren G Magnuson Park<br>Hangar 30<br>7400 Sand Point Way NE<br>Seattle, Washington<p><p>June 5 - 6<br><b><a href='http://www.mateel.org/summerarts.php'>2010 Summer Arts & Music Festival</a></b><br>Benbow Lake State Recreation Area<br>Mateel, California<p><p>June 18 - 20 (Father's Day Weekend)<br><b><a href='http://www.edmondsartsfestival.com/'>Edmonds Arts Festival</a></b><br>Frances Anderson Cultural Center<br>700 Main St<br>Edmonds, Washington<p><p>July 16 - 18<br><b><a href='http://salemartfair.weebly.com/'>61st Annual Salem Art Fair & Festival</a></b><br>600 Mission Street SE<br>Salem, Oregon<p><p>July 23 - 25<br><b><a href='http://www.bellevuearts.org/fair/index.htm'>Bellevue Arts Museum ArtsFair</a></b><br>Bellevue Square<br>Bellevue, Washington<p><p>August 6 - 8<br><b><a href='http://www.anacortesartsfestival.com/'>49th Anacortes Arts Festival</a></b><br>505 O Ave<br>Anacortes, Washington<p><p>November 26 - 28<br><b><a href='http://www.artisansfestival.org/'>Artisans Festival at Miners Foundry</a></b><br>325 Spring Street<br>Downtown Nevada City, California";

var upcoming_shows_2009 = "<font color='red'><b>2009</b></font><p>March 14<br><b><a href='http://www.roguecreamery.com/'>5th Annual Oregon Cheese Festival</a></b><br>Rogue Creamery (Right across the street from Red Oak Glass!)<br>311 N Front St<br>Central Point, Oregon<p><p>March 14 - 15<br><b><a href='http://www.contemporarycraftsmarket.com/'>Contemporary Crafts Market</a></b><br>Fort Mason Center, Festival Pavilion<br>San Francisco, California<p>April 3 - 5<br><b><a href='http://www.nwartalliance.com/event.php?eid=38&return=%2Fevents.php%3F'>Best of the Northwest</a></b><br>Seattle Center - Exhibition Hall<br>305 Harrison Street<br>Seattle, Washington<p>June 6 - 7<br><b><a href='http://www.mateel.org/summerarts.php'>2009 Summer Arts & Music Festival</a></b><br>Benbow Lake State Recreation Area<br>Mateel, California<p>June 19 - 21 (Father's Day Weekend)<br><b><a href='http://www.edmondsartsfestival.com/'>Edmonds Arts Festival</a></b><br>Frances Anderson Cultural Center<br>700 Main St<br>Edmonds, Washington<p>July 17 - 19<br><b><a href='http://salemart.org/index.php?option=com_content&task=view&id=42&Itemid=114'>Salem Art Fair & Festival</a></b><br>600 Mission Street SE<br>Salem, Oregon<p>July 24 - 26<br><b><a href='http://www.bellevuearts.org/fair/index.htm'>Bellevue Arts Museum ArtsFair</a></b><br>Bellevue Square<br>Bellevue, Washington<p>August 7 - 9<br><b><a href='http://www.anacortesartsfestival.com/'>48th Anacortes Arts Festival</a></b><br>505 O Ave<br>Anacortes, Washington<p>August 21 - 23<br><b><a href='http://www.vancouverwinejazz.com/'>12th Annual Vancouver Wine &amp; Jazz Festival</a></b><br>Esther Short Park<br>Downtown Vancouver, Washington<p>October 2 - 4<br><b><a href='http://www.americanartfestivals.com/visitor_home.html'>Sacramento Arts Festival</a></b><br>Sacramento Convention Center<br>Entrance at 14th and J Streets<br>Sacramento, California<p>November 27 - 29<br><b><a href='http://www.artisansfestival.org/'>Artisans Festival at Miners Foundry</a></b><br>325 Spring Street<br>Downtown Nevada City, California<p><hr>";

var upcoming_shows_2008 = "<font color='red'><b>2008</b></font><p>June 13 - 15 (Father's Day Weekend)<br><b><a href='http://www.edmondsartsfestival.com/'>Edmonds Arts Festival</a></b><br>Edmonds, Washington<p>July 12 - 13<br><b><a href='http://www.bendsummerfestival.com/'>Bend Summer Festival</a></b><br>Bend, Oregon<p>July 18 - 20<br><b><a href='http://salemart.org/index.php?option=com_content&task=view&id=13&Itemid=35'>Salem Art Fair &amp; Festival</a></b><br>Salem, Oregon<p>August 1 - 3<br><b><a href='http://www.anacortesartsfestival.com/'>47th Anacortes Arts Festival</a></b><br>Anacortes, Washington<p>August 15 - 17<br><b><a href='http://www.jhartfair.org/'>Jackson Hole Art Fair</a></b><br>Miller Park<br>Corner of Millward and Deloney Avenue<br>Jackson Hole, Wyoming<p>October 24 - 26<br><b><a href='http://www.americanartfestivals.com/visitor_home.html'>Sacramento Arts Festival</a></b><br>Sacramento Convention Center<br>14th and J Streets<br>Sacramento, California<p>November 14 - 16<br><b><a href='http://www.nwartalliance.com/event.php?eid=4'>Best of the Northwest</a></b><br>Seattle Center - Northwest Rooms &amp; Exhibition Hall<br>305 Harrison Street<br>Seattle, Washington<p>November 28 - 30<br><b><a href='http://www.artisansfestival.org/'>Artisans Festival at Miners Foundry</a></b><br>325 Spring Street<br>Downtown Nevada City, California";

var variation = "<table width='100%' border='0'><tr><td align='left'>Color variations, bubbles and small differences in shape and size are expected and are not considered defects, but an added artistic expression.<p>Each shade is a \"one of a kind\", hand made piece of art. When you purchase sets of lights, they will match each other, but over time they may not match an earlier version that you have purchased or seen.<p>Red Oak Glass strives to satisfy our customers in all ways possible, but the artistic inspiration cannot be taken out of the product.<p>When you order you are purchasing custom fabricated hand blown art glass. All sales are final.</td></tr></table>";




///////////functions
function find_retail_outlet(visitor_zip) {
	var box_text = "<table width='100%' cellpadding='10'>";
	
	if (visitor_zip == 'punti'){
		for (i = 0; i < retail_locations.length; i++){
			box_text += retail_locations[i];
			}
			box_text += "</table>";
			document.getElementById('retailer_box').innerHTML = box_text;
			return;
		}else{
			for (i = 0; i < retail_zips.length; i++){
				var try_zips = retail_zips[i].split(',');
				for (x = 0; x < try_zips.length; x++){
					if (0 == visitor_zip.indexOf(try_zips[x])) {box_text += retail_locations[i];}
					}
				}
		}
	if (box_text == "<table width='100%' cellpadding='10'>") {
	box_text += "<tr><td width=\'100%\' valign=\'top\'>We're sorry,<br>we did not find a retail outlet in your area.<br>Please contact us at our studio...</td></tr>";
	box_text += retail_locations[retail_locations.length-1];
		}
	box_text += "</table>";
	document.getElementById('retailer_box').innerHTML = box_text;
	return
}

function show_me(term, product, how) {
	var product_name = product;
	var more_info = "";
	if (term == '') {more_info = "<p><a href=\"/Pendant_Lighting/"+product+".html\">More information about this lamp...</a>";}
	product_name = product_name.replace(/_/g, " ");
	var box_text = "<img src='/Pictures/"+product+"_"+how+".jpg' alt='"+term+" "+product_name+"'><br>";
	if (how == 'on') {box_text += "<a href=\"javascript:show_me('"+term+"', '"+product+"', 'off');\">Show me this lamp <b>unlit</b></a><p>";}
		else {box_text += "<a href=\"javascript:show_me('"+term+"', '"+product+"', 'on');\">Show me this lamp <b>lit</b></a><p>";}
	box_text += more_info;
	document.getElementById('show_prod_box').innerHTML = box_text;
	return
}

function show_me_LIMETED(term, product, how) {
	var product_name = product;
	var more_info = "";
//	if (term == '') {more_info = "<a href=\"/Pendant_Lighting/"+product+".html\">More information about this lamp...</a></a>";}
	product_name = product_name.replace(/_/g, " ");
	var box_text = "<img src='/Pictures/"+product+"_"+how+".jpg' alt='"+term+" "+product_name+"'><br>";
	if (how == 'on') {box_text += "<a href=\"javascript:show_me_LIMETED('"+term+"', '"+product+"', 'off');\">Show me this lamp <b>unlit</b></a><p>";}
		else {box_text += "<a href=\"javascript:show_me_LIMETED('"+term+"', '"+product+"', 'on');\">Show me this lamp <b>lit</b></a><p>";}
	box_text += more_info;
	document.getElementById('show_prod_box').innerHTML = box_text;
	return
}

function preload_images() {
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preload_images.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 show_Contact() {
	var box_text = "<a href=\"javascript:hide_Contact();\"><u>Hide contact information</u></a><br>";
	box_text += "<b>Red Oak Glass</b><br>234 N Front Street<br>Central Point, OR 97520<br>(541) 665-0423<p>";
	box_text += "<a href='mailto:redoakglass@gmail.com'> RedOakGlass@gmail.com</a>";
	document.getElementById('Contact_box').innerHTML = box_text;
	return
}

function hide_Contact() {
	var box_text = "<a href=\"javascript:show_Contact();\">";
	box_text += "Click here to contact us for<br>Pricing and Ordering Information</a>";
	document.getElementById('Contact_box').innerHTML = box_text;
	return
}

function show_Pendant_Lighting_Shapes(term, PPproducts) {
	var box_text = "<a href=\"javascript:hide_Pendant_Lighting_Shapes('"+term+"', '"+PPproducts+"');\"><u>Hide "+term+" "+PPproducts+" Shapes</u></a><br>";
	box_text += "<img src=\"/Pictures/Pendant_Lighting_Shapes\.gif\">";
	document.getElementById('Pendant_Lighting_Shapes_box').innerHTML = box_text;
	return
}

function hide_Pendant_Lighting_Shapes(term, PPproducts) {
	var box_text = "<a href=\"javascript:show_Pendant_Lighting_Shapes('"+term+"', '"+PPproducts+"');\">";
	box_text += "Click here to see availiable<br>"+term+" "+PPproducts+" Shapes</a>";
	document.getElementById('Pendant_Lighting_Shapes_box').innerHTML = box_text;
	return
}


function show_map() {
	var box_text = "<a href=\"javascript:hide_map();\"><u>Hide Map</u></a>";
	box_text += "<table width='100%'  border='0' cellspacing='10' cellpadding='5' class='sm'><tr><td width='100%' valign='top'>";
	box_text += "<iframe width=\"300\" height=\"300\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"http://maps.google.com/maps?hl=en&amp;q=red+oak+glass+central+point+oregon&amp;oe=UTF-8&amp;ie=UTF8&amp;cd=1&amp;om=0&amp;cid=42375834,-122919830,7592623001468164541&amp;s=AARTsJoE2AZMBAoT6f2c5beHeY8X9MIqAA&amp;ll=42.385747,-122.91564&amp;spn=0.019019,0.025749&amp;z=14&amp;iwloc=A&amp;output=embed\"></iframe><br /><a href=\"http://maps.google.com/maps?hl=en&amp;q=red+oak+glass+central+point+oregon&amp;oe=UTF-8&amp;ie=UTF8&amp;cd=1&amp;om=0&amp;cid=42375834,-122919830,7592623001468164541&amp;ll=42.385747,-122.91564&amp;spn=0.019019,0.025749&amp;z=14&amp;iwloc=A&amp;source=embed\" style=\"color:#ffffff;text-align:left\">View Larger Map</a>";
	box_text += "</td></tr>";
	document.getElementById('map_box').innerHTML = box_text;
	return
}

function hide_map(){
	var box_text = "<a href=\"javascript:show_map()\;\"><u>Click here to see a map and directions to our studio.</u></a>";
	document.getElementById('map_box').innerHTML = box_text;
	return
}

function show_shows() {
	var box_text = "";
	if (parent.document.location=="http://www.redoakglass.com/shows.html") {box_text += "";} 
	else if (parent.document.location=="http://redoakglass.com/shows.html") {box_text += "";} 
	else {box_text += "<a href=\"javascript:hide_shows();\"><u>Hide Shows</u></a>";}

	box_text += "<table width='100%'  border='0' cellspacing='10' cellpadding='5' class='sm'><tr><td width='100%' valign='top'>";
	box_text += upcoming_shows;
	box_text += "</td></tr>";
	document.getElementById('show_box').innerHTML = box_text;
	return
}

function hide_shows(){
	var box_text = "<a href=\"javascript:show_shows()\;\"><u>Click here</u></a>";
	document.getElementById('show_box').innerHTML = box_text;
	return
}

function show_retailers() {
	var box_text = "<a href=\"javascript:hide_retailers();\"><u>Hide Retailers</u></a>";
	box_text += "<table width='100%'  border='0' cellspacing='10' cellpadding='5' class='sm'><tr>";
	box_text += "<td width='50%' valign='top'><b>Red Oak Glass</b><br>234 N Front Street<br>Central Point, OR 97502<br>(541) 665-0423</td>";
	box_text += "<td width='50%' valign='top'><b>Lightolier</b><br>2965 S Maryland Pkwy<br>Las Vegas, NV 89109</td>";
	box_text += "</tr><tr>";
	box_text += "<td width='50%' valign='top'><b>Nimbus Gallery</b><br>25 E Main Street<br>Ashland, OR 97520<br>(541)482-3621</td>";
	box_text += "<td width='50%' valign='top'><b>Lighting Solutions</b><br>11780 Metro Pkwy<br>Fort Myers, FL 33912<br>(239)939-6900<br><a href=\"http://www.lightthis.com\">www.Light This.com</a></td>";
	box_text += "</tr><tr>";
	box_text += "<td width='50%' valign='top'><b>Escent Lighting Gallery</b><br>W 605 Spokane Falls Blvd<br>Spokane, WA 99201<br>(509)838-9028<br><a href=\"http://www.escent-ltg..com\">www.Escent-Ltg..com</a></td>";
	box_text += "<td width='50%' valign='top'><b>Cest La Vie</b><br>320 5th Avenue S<br>Edmonds, WA 98020<br>(877)548-4506<br><a href=\"http://www.clvcatalog.com\">www.CLVcatalog.com</a></td>";
	box_text += "<td width='50%' valign='top'></td>";
	box_text += "</tr></table>";
	document.getElementById('retailer_box').innerHTML = box_text;
	return
}

function hide_retailers(){
	document.getElementById('retailer_box').innerHTML = "";
	return
}


function show_variation() {
	var box_text = "";
	box_text += "<a href=\"javascript:hide_variation();\"><u>Hide</u></a>";
	box_text += "<table width='100%'  border='0' cellspacing='0' cellpadding='10' class='sm'><tr><td width='100%' valign='top'>";
	box_text += variation;
	box_text += "</td></tr>";
	document.getElementById('variation_box').innerHTML = box_text;
	return
}

function hide_variation(){
	var box_text = "<a href=\"javascript:show_variation()\;\"><u>About variation...</u></a>";
	document.getElementById('variation_box').innerHTML = box_text;
	return
}



function initialize() {
	var blurb_text = "";
	if ((parent.document.location == "http://redoakglass.com/contact.html")||(parent.document.location == "http://www.redoakglass.com/contact.html")){
		blurb_text += "Email:&nbsp;&nbsp;<a href='mailto:redoakglass@gmail.com'><font color='red'>RedOakGlass@gmail.com</font></a>";
		document.getElementById('mail_box').innerHTML = blurb_text;
		}
	document.getElementById('contact_mail').innerHTML = "Contact: <a href='mailto:redoakglass@gmail.com'>RedOakGlass@gmail.com</a>";
	return;
}
////////////////////////////////////////////////////////

//////////dynamic drive
/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="/Pendant_Lighting/Gallery/Page_1.html">Pendant Lighting 1</a>'
menu1[1]='<a href="/Pendant_Lighting/Gallery/Page_2.html">Pendant Lighting 2</a>'
menu1[2]='<a href="/Pendant_Lighting/Gallery/Page_3.html">Pendant Lighting 3</a>'
menu1[3]='<a href="/installations.html">Installed Lamps</a>'


//Contents for menu 2
var menu2=new Array()
menu2[0]='<a href="/about.html">Who we are...</a>'
menu2[1]='<a href="/shows.html">Upcoming Shows</a>'
menu2[3]='<a href="/news.html">In the News</a>'
		
//Contents for menu 3
var menu3=new Array()
menu3[0]='<a href="/contact.html">Contact Us</a>'
//menu3[2]='<a href="/installations.html">Installations</a>'
		
var menuwidth='165px' //default menu width
var menubgcolor='black'  //menu bgcolor
var disappeardelay=150  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

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, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
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=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) 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 (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

////////////////////////////////////////////////////////

