<!--Start Menu Javascripts-->



var turn_on = function(section) {

   menu[section].on = true;

   $(section+"_img").src = menu[section].lite; }



var defaultText = false;

var last = null;



var menu = {};



menu["clothes"] = {

   dark: 'images/menubar/clothes_off.png',

   over: 'images/menubar/clothes_on.png',

   lite: 'images/menubar/clothes_lite.png',

   on: false,

   selected: false,

   align: 'left',

   links: [

    ['The Collection', 'clothes/display_contents.php?page=collection.php&sec=clothes'],

    ['Women', 'clothes/display_contents.php?page=women.php&sec=clothes'],

    ['Youth', 'clothes/display_contents.php?page=youth.php&sec=clothes'],

    ['Accessories', 'clothes/display_contents.php?page=accessories.php&sec=clothes']	

   ]

};



menu["company"] = {

   dark: 'images/menubar/company_off.png',

   over: 'images/menubar/company_on.png',

   lite: 'images/menubar/company_lite.png',

   on: false,

   selected: false,

   align: 'center',

   links: [

    ['Retail', 'company/display_contents.php?page=retail.php&sec=company'],

    ['Partnerships', 'company/display_contents.php?page=partnerships.php&sec=company'],

    ['Press', 'company/display_contents.php?page=press.php&sec=company'],

    ['Careers', 'company/display_contents.php?page=careers.php&sec=company']

   ]

};



menu["culture"] = {

   dark: 'images/menubar/culture_off.png',

   over: 'images/menubar/culture_on.png',

   lite: 'images/menubar/culture_lite.png',

   on: false,

   selected: false,

   align: 'right',

   links: [

    ['Fashion', 'culture/display_contents.php?page=fashion.php&sec=culture'],

    ['Athletics', 'culture/display_contents.php?page=athletics.php&sec=culture'],

    ['Community', 'culture/display_contents.php?page=community.php&sec=culture'],

    ['Entertainment', 'culture/display_contents.php?page=entertainment.php&sec=culture']

   ]

};







function $(x) {

   return document.getElementById(x);

}



var toggle = function(section) {

   setColor("light_tan", "tan");

   if (last == section) return;



   if (!defaultText) defaultText = $("menu_items").innerHTML;



   for(var s in menu) {

     if (s == section) {

       if (!menu[section].selected) {

         $(section+"_img").src = menu[section].over;

         menu[section].selected = true;

         showlinks(section);

       } else {

         $(section+"_img").src = default_img(section);

         menu[section].selected = false;

       }

       

     } else {

       clear_item(s);

     }

   }



   last = section;

}



function setColor(c1, c2) {

  if (!c2) c2 = c1;

  $("title_items").style.background = "url(images/" + c1 + "_bg.png)";

  $("title_edge").src = "images/" + c1 + "_edge.png";

  $("menu_items").style.background = "url(images/" + c2 + "_bg.png)";

  var newclass = "defaultText ";

  newclass += c1 == 'light_tan' ? "light_tanLink" : "grayLink";

  

  var c = 1;

  while($("link"+c)) {

    $("link"+c).className = newclass;

    c++;

  }

}



var showlinks = function(section) {

   var output = "<div align='" + menu[section].align + "' class='menuLink'>";

   var links = menu[section].links

   var first = true;

   for(var i in links) {

     if(first) first = false;

     else      output += " | "

     output += "<a href='" + links[i][1] + "' class='menuLink'>" + links[i][0] + "</a> ";

   }



   output += "</center>";



   $("menu_items").innerHTML = output;

}



var default_img = function(section) {

   return menu[section].on ? menu[section].lite : menu[section].dark; }



var mouse_over = function(e) {

   e = e ? e : window.e;

   var object = e.target ? e.target : e.srcElement;



   var menu_over = (object.id == 'menu_items');



   if (!menu_over) {

     for(var section in menu) {

       if(object.id == section+"_img") {

          menu_over = true;

          toggle(section);

       }

     }

   }



   if (!menu_over && object.className != 'menuLink') clear_menu(); }



var clear_item = function(section) {

   $(section+"_img").src = default_img(section);

   menu[section].selected = false;

}



var clear_menu = function() {

   for(var section in menu) {

     clear_item(section);

   }



   if (defaultText)

     $("menu_items").innerHTML = defaultText;

   defaultText = false;

   last = null;

   setColor("gray");

}

<!--End Menu Javascripts-->



<!--Start Email Javascripts-->

	var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i



	function checkmail(e){

	var returnval=emailfilter.test(e.value)

	if (returnval==false){

	alert("Illegitimacy detected, enter valid email to proceed.")

	e.select()

	}

	return returnval

	}



	function submitonce(theform){

	if (document.all||document.getElementById){

	for (i=0;i<theform.length;i++){

	var tempobj=theform.elements[i]

	if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")

	tempobj.disabled=true

	}

	}

	}

<!--End Email Javascripts-->



<!--Start Date Javascripts-->

	var mydate=new Date()

	var year=mydate.getYear()

	if (year < 1000)

	year+=1900

<!--End Date Javascripts-->
