function fwLoadMenus() {
  if (window.fw_menu_0) return;
  window.fw_menu_1 = new Menu("root",75,18,"Verdana, Arial, Helvetica, sans-serif",11,"#B80007","#000000","#F8E0BF","#FFD27F");
  fw_menu_1.addMenuItem("Male","location='diamond-rings-male-1.html'");
  fw_menu_1.addMenuItem("Female","location='diamond-rings-female-1.html'");
   fw_menu_1.hideOnMouseOut=true;
    window.fw_menu_2 = new Menu("root",75,18,"Verdana, Arial, Helvetica, sans-serif",11,"#B80007","#000000","#F8E0BF","#FFD27F");
  fw_menu_2.addMenuItem("General","location='gal-diamond-lockets-1.html'");
  fw_menu_2.addMenuItem("Zodiac","location='diamond-zodiac-sign-1.html'");
  fw_menu_2.addMenuItem("Alphabetic","location='alphabetic-lockets-1.html'");
   fw_menu_2.hideOnMouseOut=true;
   window.fw_menu_3 = new Menu("root",100,18,"Verdana, Arial, Helvetica, sans-serif",11,"#B80007","#000000","#F8E0BF","#FFD27F");
fw_menu_3.addMenuItem("Nose Pins","location='diamond-accessories-nosepins-1.html'");
  fw_menu_3.addMenuItem("Tie Pin (Clip)","location='diamond-accessories-tie-pin-1.html'");
  fw_menu_3.addMenuItem("Cufflink","location='diamond-accessories-cufflink-1.html'");
   fw_menu_3.hideOnMouseOut=true;
    window.fw_menu_6_3 = new Menu("Bracelets",67,18,"Verdana, Arial, Helvetica, sans-serif",11,"#B80007","#000000","#F8E0BF","#FFD27F");
    fw_menu_6_3.addMenuItem("Male","location='south-indian-bracelets-male-1.html'");
    fw_menu_6_3.addMenuItem("Female","location='south-indian-bracelets-female-1.html'");
     fw_menu_6_3.hideOnMouseOut=true;
  window.fw_menu_6 = new Menu("root",175,18,"Verdana, Arial, Helvetica, sans-serif",11,"#B80007","#000000","#F8E0BF","#FFD27F");
  fw_menu_6.addMenuItem("Nan Tar (Mangal Suthra)","location='south-indian-nan-tar-1.html'");
  fw_menu_6.addMenuItem("Nallapusalu (Black Beads)","location='south-indian-black-beads-1.html'");
  fw_menu_6.addMenuItem("Pusti","location='south-indian-pusti-1.html'");
  fw_menu_6.addMenuItem("Vaddanam","location='south-indian-vadranam-1.html'");
  fw_menu_6.addMenuItem("Aravanki","location='south-indian-aravanki-1.html'");
  fw_menu_6.addMenuItem("Chandrahar","location='south-indian-chandrahar-1.html'");
  fw_menu_6.addMenuItem("Kasu Danda","location='south-indian-kasu-danda-1.html'");
  fw_menu_6.addMenuItem("Pendents","location='south-indian-pendents-1.html'");
  fw_menu_6.addMenuItem("Necklaces","location='south-indian-necklaces-1.html'");
  fw_menu_6.addMenuItem("Mamidipinda","location='south-indian-mamidipinda-1.html'");
  fw_menu_6.addMenuItem("Ear Rings","location='south-indian-ear-rings-1.html'");
  fw_menu_6.addMenuItem("Bangles","location='south-indian-bangles-1.html'");
  fw_menu_6.addMenuItem(fw_menu_6_3,"location='south-indian-bracelets-1.html'");
  fw_menu_6.addMenuItem("Rings","location='south-indian-rings-1.html'");
  fw_menu_6.addMenuItem("Chains","location='south-indian-chains-1.html'");
  fw_menu_6.addMenuItem("Nose Pins","location='south-indian-nose-pins-1.html'");
  fw_menu_6.addMenuItem("Corpse","location='south-indian-corpse-1.html'");
  fw_menu_6.addMenuItem("Accessories","location='south-indian-accessories-1.html'");
   fw_menu_6.hideOnMouseOut=true;
   fw_menu_6.childMenuIcon="i/arrows.gif";
    window.fw_menu_7_2 = new Menu("Rings",67,18,"Verdana, Arial, Helvetica, sans-serif",11,"#B80007","#000000","#F8E0BF","#FFD27F");
    fw_menu_7_2.addMenuItem("Male","location='north-indian-rings-male-1.html'");
    fw_menu_7_2.addMenuItem("Female","location='north-indian-rings-female-1.html'");
     fw_menu_7_2.hideOnMouseOut=true;
    window.fw_menu_7_3 = new Menu("Bracelets",67,18,"Verdana, Arial, Helvetica, sans-serif",11,"#B80007","#000000","#F8E0BF","#FFD27F");
    fw_menu_7_3.addMenuItem("Male","location='north-indian-bracelets-male-1.html'");
    fw_menu_7_3.addMenuItem("Female","location='north-indian-bracelets-female-1.html'");
     fw_menu_7_3.hideOnMouseOut=true;
  window.fw_menu_7 = new Menu("root",83,18,"Verdana, Arial, Helvetica, sans-serif",11,"#B80007","#000000","#F8E0BF","#FFD27F");
  fw_menu_7.addMenuItem("Necklaces","location='north-indian-necklaces-1.html'");
  fw_menu_7.addMenuItem("Chains","location='north-indian-chains-1.html'");
  fw_menu_7.addMenuItem("Lockets","location='north-indian-lockets-1.html'");
  fw_menu_7.addMenuItem("Bangles","location='north-indian-bangles-1.html'");
  fw_menu_7.addMenuItem(fw_menu_7_2,"location='north-indian-rings-1.html'");
  fw_menu_7.addMenuItem("Corpse","location='north-indian-corpse-1.html'");
  fw_menu_7.addMenuItem(fw_menu_7_3,"location='north-indian-bracelets-male-1.html'");
  fw_menu_7.addMenuItem("Tika","location='gal-north-tika-1.html'");
  fw_menu_7.addMenuItem("Nose Pins","location='north-indian-nose-pins-1.html'");
  fw_menu_7.addMenuItem("Accessories","location='gal-north-accessories-1.html'");
   fw_menu_7.hideOnMouseOut=true;
   fw_menu_7.childMenuIcon="i/arrows.gif";
    window.fw_menu_8_1 = new Menu("Necklaces",112,18,"Verdana, Arial, Helvetica, sans-serif",11,"#B80007","#000000","#F8E0BF","#FFD27F");
    fw_menu_8_1.addMenuItem("KundanJadavi","location='western-kundanjadavi-1.html'");
    fw_menu_8_1.addMenuItem("Beads","location='western-beads-1.html'");
    fw_menu_8_1.addMenuItem("Meenakari","location='western-meenakari-1.html'");
    fw_menu_8_1.addMenuItem("Nakshi","location='western-nakshi-1.html'");
    fw_menu_8_1.addMenuItem("Handmade","location='western-handmade-1.html'");
    fw_menu_8_1.addMenuItem("Fancy","location='western-fancy-1.html'");
     fw_menu_8_1.hideOnMouseOut=true;
      window.fw_menu_8_2 = new Menu("Bangles",112,18,"Verdana, Arial, Helvetica, sans-serif",11,"#B80007","#000000","#F8E0BF","#FFD27F");
    fw_menu_8_2.addMenuItem("KundanJadavi","location='western-bangles-kundanjadavi-1.html'");
    fw_menu_8_2.addMenuItem("Meenakari","location='western-bangles-meenakari-1.html'");
    fw_menu_8_2.addMenuItem("Nakshi","location='western-bangles-nakshi-1.html'");
    fw_menu_8_2.addMenuItem("Handmade","location='western-bangles-handmade-1.html'");
    fw_menu_8_2.addMenuItem("Fancy","location='western-bangles-fancy-1.html'");
     fw_menu_8_2.hideOnMouseOut=true;
     fw_menu_8_2.childMenuIcon="i/arrows.gif";
    window.fw_menu_8 = new Menu("root",108,18,"Verdana, Arial, Helvetica, sans-serif",11,"#B80007","#000000","#F8E0BF","#FFD27F");
  fw_menu_8.addMenuItem(fw_menu_8_1,"location='western-kundanjadavi-1.html'");
  fw_menu_8.addMenuItem(fw_menu_8_2,"location='western-bangles-kunadanjadavi-1.html'");
fw_menu_8.addMenuItem("Pendents","location='western-pendents-1.html'");
fw_menu_8.addMenuItem("Tika","location='gal-western-tika-1.html'");
  fw_menu_8.addMenuItem("Kammar Patta","location='gal-western-kammar-patta-1.html'");
  fw_menu_8.addMenuItem("Nose Pins","location='western-nose-pins-1.html'");
  fw_menu_8.addMenuItem("Corpse","location='western-corpse-1.html'");
  fw_menu_8.addMenuItem("Rings","location='western-rings-1.html'");
  fw_menu_8.addMenuItem("Ear Rings","location='western-ear-rings-1.html'");
  fw_menu_8.addMenuItem("Accessories","location='gal-western-accessories-1.html'");
   fw_menu_8.hideOnMouseOut=true;
   fw_menu_8.childMenuIcon="i/arrows.gif";

  fw_menu_8.writeMenus();
}

function f_validateOrderForm(){

if (!empty_check(window.document.fm1.p_code, "Product Code")) {
   event.returnvalue = false;
   return false;
}
if (!empty_check(window.document.fm1.message, "Description/Message")) {
   event.returnvalue = false;
   return false;
}
if (!empty_check(window.document.fm1.visitor_name, "Name")) {
   event.returnvalue = false;
   return false;
}
if (!empty_check(window.document.fm1.telephone_no, "Telephone")) {
   event.returnvalue = false;
   return false;
}else if(!validatePh(document.forms[0].telephone_no)){
   event.returnvalue = false;
   return false;
}

if (!empty_check(window.document.fm1.email, "eMail")) {
   event.returnvalue = false;
   return false;
}else if(!f_checkMailid(document.forms[0].email , "your mail id." )){
   event.returnvalue = false;
   return false;
}
}

// For contact us form

function f_contact() {

 trim_it(document.forms[0].message);
 trim_it(document.forms[0].telephone_no);

       if(!validate_name(document.forms[0].visitor_name,"your name.")){ return false; }   
       else if(!validatePh(document.forms[0].telephone_no) ){return false; }
       else if (!f_checkMailid(document.forms[0].email , "your mail id." ) ){ return false;  }
       else if(document.forms[0].message.value=='' || document.forms[0].message.value==null){
                 alert("Enter your  message.");
                 document.forms[0].message.focus();
                 return false;  
       }else{
	return true;  
        }
}
	

function trim_it(field1) {
// remove leading spaces.
while(''+field1.value.charAt(0)==' ') {
   field1.value=field1.value.substring(1,field1.value.length);
}
// remove trailing spaces.
while(''+field1.value.charAt(field1.value.length-1)==' ') {
   field1.value=field1.value.substring(0,field1.value.length-1);
}
}

function empty_check(field1, fieldName) {
trim_it(field1);
if (field1.value == "") {
   field1.select();
   alert(fieldName + " can not be left empty.");
   field1.focus();
   return false;
}
return true;
}


// Email Validation. Written by PerlScriptsJavaScripts.com

function f_checkMailid(mailid,message){

 trim_it(mailid);
 e=mailid.value;

     if(e=='' || e==null){
     alert("Enter " + message );
     mailid.focus();
     mailid.select();
     return false;
     }


 ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";

   for(i=0; i < e.length ;i++){
	if(ok.indexOf(e.charAt(i))<0){ 
	alert("Check" + message);
                  mailid.focus();
	mailid.select();
       	return (false);                  
	}	
    } 

   if (document.images) {                 
	re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
	re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
	if (!e.match(re) && e.match(re_two)) {	
	return (-1);		
	}else{
	alert("Check " + message);
                  mailid.focus();
	mailid.select();
	return false;
	}
   }
}

// validating name

function validate_name(field,message) {
trim_it(field);
var valid = "abcdefghijklmnopqrstuvwxyz0123456789_. "
var ok = "yes";
var temp;

   if(field.value=='' || field.value==null){
     alert("Enter  " + message);
     field.focus();
     return false; 
     }


  for (var i=0; i<field.value.length; i++) {
        temp = "" + field.value.substring(i, i+1);
        temp = temp.toLowerCase();
        if (valid.indexOf(temp) == "-1") {
           ok = "no";
           }
  }

  if (ok == "no") {
     alert("Invalid name!  Only alphabets, numbers, underscore and periods are accepted!");
     field.focus();
     field.select();
     return false;
  }else
     return true;  

}

function validatePh(field) {
var valid = "-0123456789"
var ok = "yes";
var temp;
for (var i=0; i<field.value.length; i++) {
temp = "" + field.value.substring(i, i+1);
if (valid.indexOf(temp) == "-1") ok = "no";
}
if (ok == "no") {
alert("Invalid entry!  Only numbers are accepted,you can use 'Hyphen'  to seperate country and area code!");
field.focus();
field.select();
return false;
   }else
    return true; 
}

//Copy Right
function copyRight(startYear) {
    date = new Date();
    year = date.getYear();
    if ( (year - startYear) > 0){
       document.write(startYear + " - " + year);
    }else{
     document.write(startYear);
    }
}

