// JavaScript Document
function searchbtn()

{

var sc=document.getElementById("category").value;

var sp=document.getElementById("product").value;



if( (sc == "sc") && (sp == "sp") )

{

alert("Please make a Selection");

return false;

}



var site=document.getElementById("product").value;



if(site=="Ganesha") { window.location.href="whitewood-ganesha.html"; }

if(site=="Lakshmi") { window.location.href="whitewood-lakshmi.html"; }

if(site=="Sarwaswati") { window.location.href="whitewood-saraswati.html"; }

if(site=="Dashavatara") { window.location.href="whitewood-dashavatara.html"; }

if(site=="Vishnu vishwaroopa") { window.location.href="whitewood-vishnu-vishwaroopa.html"; }

if(site=="Krishna") { window.location.href="whitewood-krishna.html"; }

if(site=="Radha Krishna") { window.location.href="whitewood-radhakrishna.html"; }



if(site=="Ganeshasw") { window.location.href="sandalwood-ganesha.html"; }

if(site=="Lakshmisw") { window.location.href="sandalwood-lakshmi.html"; }

if(site=="Sarwaswatisw") { window.location.href="sandalwood-saraswati.html"; }

if(site=="Dashavatarasw") { window.location.href="sandalwood-dashavatara.html"; }

if(site=="Vishnu vishwaroopasw") { window.location.href="sandalwood-vishnu-vishwaroopa.html"; }

if(site=="Krishnasw") { window.location.href="sandalwood-krishna.html"; }

if(site=="Radha Krishnasw") { window.location.href="sandalwood-radhakrishna.html"; }



if(site=="nonerf") { window.location.href="rosewood-furnitures.html"; }

if(site=="nonerwps") { window.location.href="wood-art.html"; }

if(site=="nonerwpg") { window.location.href="wood-craft.html"; }

if(site=="noners") { window.location.href="wood-statue.html"; }

if(site=="noneti") { window.location.href="wood-sculpture.html"; }



}



function changeincategory()

{

var prod=document.getElementById("category").selectedIndex;

var prod1=document.getElementById("product");



if( (prod == 2) )

{

var i;

for(i=prod1.options.length-1;i>=0;i--)

{

prod1.remove(i);

}



var optn1 = document.createElement ("OPTION");

optn1.text = "Ganesha";

optn1.value = "Ganeshasw";

optn1.href="sandalwood-ganesha.html";

prod1.options [0] = optn1;



var optn2 = document.createElement ("OPTION");

optn2.text = "Lakshmi";

optn2.value = "Lakshmisw";

optn2.href="sandalwood-lakshmi.html";

prod1.options [1] = optn2;



var optn3 = document.createElement ("OPTION");

optn3.text = "Sarwaswati";

optn3.value = "Sarwaswatisw";

optn3.href="sandalwood-saraswati.html";

prod1.options [2] = optn3;



var optn4 = document.createElement ("OPTION");

optn4.text = "Dashavatara";

optn4.value = "Dashavatarasw";

optn4.href="sandalwood-dashavatara.html";

prod1.options [3] = optn4;



var optn5 = document.createElement ("OPTION");

optn5.text = "Vishnu vishwaroopa";

optn5.value = "Vishnu vishwaroopasw";

optn5.href="sandalwood-vishnu-vishwaroopa.html";

prod1.options [4] = optn5;



var optn6 = document.createElement ("OPTION");

optn6.text = "Krishna";

optn6.value = "Krishnasw";

optn6.href="sandalwood-krishna.html";

prod1.options [5] = optn6;



var optn7 = document.createElement ("OPTION");

optn7.text = "Radha Krishna";

optn7.value = "Radha Krishnasw";

optn7.href="sandalwood-radhakrishna.html";

prod1.options [6] = optn7;

}



if( (prod == 3) )

{

var i;

for(i=prod1.options.length-1;i>=0;i--)

{

prod1.remove(i);

}



var optn8 = document.createElement ("OPTION");

optn8.text = "Furniture";

optn8.value = "nonerf";

optn8.href="rosewood-furnitures.html";

prod1.options[0] = optn8;

}



if( (prod == 4) )

{

var i;

for(i=prod1.options.length-1;i>=0;i--)

{

prod1.remove(i);

}



var optn9 = document.createElement ("OPTION");

optn9.text = "Wall Panels Scenaries";

optn9.value = "nonerwps";

optn9.href="wood-art.html";

prod1.options[0] = optn9;

}



if( (prod == 5) )

{

var i;

for(i=prod1.options.length-1;i>=0;i--)

{

prod1.remove(i);

}



var optn10 = document.createElement ("OPTION");

optn10.text = "Wall Panels Gods";

optn10.value = "nonerwpg";

optn10.href="wood-craft.html";

prod1.options[0] = optn10;

}



if( (prod == 6) )

{

var i;

for(i=prod1.options.length-1;i>=0;i--)

{

prod1.remove(i);

}



var optn11 = document.createElement ("OPTION");

optn11.text = "Statues";

optn11.value = "noners";

optn11.href="wood-statue.html";

prod1.options[0] = optn11;

}



if( (prod == 7) )

{

var i;

for(i=prod1.options.length-1;i>=0;i--)

{

prod1.remove(i);

}



var optn12 = document.createElement ("OPTION");

optn12.text = "Idols";

optn12.value = "noneti";

optn12.href="wood-sculpture.html";

prod1.options[0] = optn12;

}



if( (prod == 1) )

{

var i;

for(i=prod1.options.length-1;i>=0;i--)

{

prod1.remove(i);

}



var optn13 = document.createElement ("OPTION");

optn13.text = "Ganesha";

optn13.value = "Ganesha";

optn13.href="whitewood-ganesha.html";

prod1.options [0] = optn13;



var optn14 = document.createElement ("OPTION");

optn14.text = "Lakshmi";

optn14.value = "Lakshmi";

optn14.href="whitewood-lakshmi.html";

prod1.options [1] = optn14;



var optn15 = document.createElement ("OPTION");

optn15.text = "Sarwaswati";

optn15.value = "Sarwaswati";

optn15.href="whitewood-saraswati.html";

prod1.options [2] = optn15;



var optn16 = document.createElement ("OPTION");

optn16.text = "Dashavatara";

optn16.value = "Dashavatara";

optn16.href="whitewood-dashavatara.html";

prod1.options [3] = optn16;



var optn17 = document.createElement ("OPTION");

optn17.text = "Vishnu vishwaroopa";

optn17.value = "Vishnu vishwaroopa";

optn17.href="whitewood-vishnu-vishwaroopa.html";

prod1.options [4] = optn17;



var optn18 = document.createElement ("OPTION");

optn18.text = "Krishna";

optn18.value = "Krishna";

optn18.href="whitewood-krishna.html";

prod1.options [5] = optn18;



var optn19 = document.createElement ("OPTION");

optn19.text = "Radha Krishna";

optn19.value = "Radha Krishna";

optn19.href="whitewood-radhakrishna.html";

prod1.options [6] = optn19;



}



}

function check(){
									var d=document.form3;
									if(d.conper.value==""){alert("Please enter Contact Person Name");d.conper.focus();return false;}
									if(d.email.value==""){alert("Please enter E-Mail");d.email.focus();return false;}
									var m = d.email.value
									var n = d.email.value
									  var cnt=0,spc=0,dot=0;
									  for(var i=1;i<=m.length;i++)
									  {
										 if(m.charAt(i)=="@")
											cnt++;
										 if(m.charAt(i)==" ")
											spc++;
										 if(m.charAt(i)==".")
											dot++;
									 }
									  lnm=m.length
									  if(cnt==0||cnt>1||spc!=0||dot==0 ||lnm<=2 )
									  {
										alert("Invalid mail address.Mail id should have an @,nospaces and a '.'   ");
									  d.email.focus();
									  return false;
									   }

									if (d.rnd1.value!=d.rndnumber.value){alert("Please Enter the Security Code");d.rnd1.value="";d.rnd1.focus();return false;}
									d.action="feedback.php";
								}
								
function valid()
{
var contact=document.getElementById("orderform");
if(contact.name.value==''){alert('Enter your Name'); contact.name.focus();return false;}

if(contact.add.value==''){alert('Enter your Address'); contact.add.focus();return false;}


if(contact.email.value==''){alert('Enter Email name'); contact.email.focus();return false;}
if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.contact.email.value))
		 {alert('Enter Valid Email ID'); contact.email.focus();return false; }


if(contact.tele.value==''){alert('Enter Telephone phone'); contact.tele.focus();return false;}
if(isNaN(contact.tele.value))
		 {alert('Enter valid phone Number'); contact.tele.focus();return false;}



if(contact.det.value==''){alert('Enter your Details'); contact.det.focus();return false;}
	document.getElementById("orderform").action="order.php";
}								

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function show(i)
{
	var x=document.getElementById("dlink").offsetLeft;
	var y=document.getElementById("dlink").offsetTop;


	if (i=="1")
	{
		document.getElementById("dmenu").style.display="block";
		document.getElementById("dmenu").style.position="absolute";
		document.getElementById("dmenu").style.Zindex="100";
		document.getElementById("dmenu").style.top=y+"px";
		document.getElementById("dmenu").style.left=x+"px";
	}
	else if (i=="0")
	{
		document.getElementById("dmenu").style.display="none";
	}
}


