function vdate()
{
var dat=new Date();
var mon=dat.getMonth();
var yr=dat.getYear();
if (yr<1000) yr+=1900;
var m=new Array("January","February","March","April","May","June","July","August","September","October", "November","December");
document.write(m[mon] + " " +dat.getDate()  + ", "+yr);
}
function checkonlynumber(str,fldName)
{
	if ((isNaN(str))) {
	return true;
	}
	else
	{
		alert("Please enter the "+fldName);
		return false;
	}
	
}
function trim(str)
{
return str.replace(/^\s*|\s*$/g,"");
}
function valid_email(txtemail)
{
if ((txtemail.value.indexOf("@") == -1)||(txtemail.value.indexOf(".") == -1))
{
alert("Please Enter the proper E-mail Address! ");
txtemail.focus();
txtemail.select();
return(false);
}
}
function IsNumber(txt)
{
	var ValidChars = "0123456789.";
	var Char;
	var sText=txt;
	for (i = 0; i < sText.length; i++) 
	{ 
	Char = sText.charAt(i); 
	if (ValidChars.indexOf(Char) == -1) 
	{
	return (false);
	}
	}
	return (true);
}

function validate_date(day,month,year)
{
	// since jan equals one and not zero, hence thirteen elements in the array.  
	var no_of_days_in_month = new Array(0,31,28,31,30,31,30,31,31,30,31,30,31)
	if (month >= 1 && month <= 12 && day >=  1 && day <= 31 && year >= 0)
	{
	//Handling february, special case. 
	if (month == 2)
	{
	if ( (year%4==0 && year%100 != 0) || year%400 == 0 )
	no_of_days_in_month[month]=29
	}
	if (day >= 1 && day <= no_of_days_in_month[month])
	return true;
	else
	return false;
	}
	else
	return false;
}
function valid_lang(cmb_lang,lvl,chksp,chklt,chkrd,chkwt)
{
	if (cmb_lang.value!='')
	{
	lvl.style.visibility="visible";
	chksp.style.visibility="visible";
	chklt.style.visibility="visible";
	chkrd.style.visibility="visible";
	chkwt.style.visibility="visible";
	}
	else
	{
	lvl.style.visibility="hidden";
	lvl.selectedIndex=0;
	chksp.style.visibility="hidden";
	chklt.style.visibility="hidden";
	chkrd.style.visibility="hidden";
	chkwt.style.visibility="hidden";
	chksp.checked=false;
	chklt.checked=false;
	chkrd.checked=false;
	chkwt.checked=false;
	}
}
function calc_len(lbl,txt,maxlen)
{
lbl.value=txt.value.length;
if (txt.value.length>maxlen)
{
alert('You can enter only '+ maxlen +' Characters');
txt.value=txt.value.substring(0,maxlen);
lbl.value=txt.value.length;
txt.focus();
}
}
function valid_txtbox(txt,msg)
{
if (trim(txt.value)=='')
{
alert('Please enter '+ msg);
txt.focus();
txt.select();
return(false);
}
}
function valid_cmb(cmb,msg)
{
if (cmb.value=='')
{
alert('Please select '+ msg);
cmb.focus();
return(false);
}
}
function valid_language(cmb_lang,chksp,chklt,chkrd,chkwt)
{
	if (cmb_lang.value!='')
	{
	chksp.style.visibility="visible";
	chklt.style.visibility="visible";
	chkrd.style.visibility="visible";
	chkwt.style.visibility="visible";
	}
	else
	{
	chksp.style.visibility="hidden";
	chklt.style.visibility="hidden";
	chkrd.style.visibility="hidden";
	chkwt.style.visibility="hidden";
	chksp.selectedIndex=0;
	chklt.selectedIndex=0;
	chkrd.selectedIndex=0;
	chkwt.selectedIndex=0;
	}
}
function txtvisible(cmb,txt,y)
{
if (cmb.value==y)
{
txt.style.backgroundColor="White"
txt.disabled=false;
//txt.focus();
}
else
{
txt.value='';
txt.style.backgroundColor="lightgrey"
txt.disabled=true;
}
}
function txtvisiblelbl(cmb,txt,y,lbl)
{
if (cmb.value==y)
{
txt.style.backgroundColor="White"
txt.disabled=false;
}
else
{
lbl.value='0';
txt.value='';
txt.style.backgroundColor="lightgrey"
txt.disabled=true;
}
}
function val_txtgrid(ctrl,msg)
{
if (document.getElementById(ctrl)!=null)
	{
		if (trim(document.getElementById(ctrl).value)=='')
		{
		alert('Please enter '+ msg);
		document.getElementById(ctrl).focus();
		document.getElementById(ctrl).select();
		return(false);
		}
	}
}
function val_txtgridnum(ctrl,msg)
{
if (document.getElementById(ctrl)!=null)
	{
		if (IsNumber(document.getElementById(ctrl).value)==false)
		{
		alert('Please enter '+ msg);
		document.getElementById(ctrl).focus();
		document.getElementById(ctrl).select();
		return(false);
		}
	}
}
function header()
			{
				document.write("<FORM id='frmhead' name=frmEmailLogin action=http://seasonsindia.mail.everyone.net/email/scripts/loginuser.pl method=post target=new>");
				document.write("<TABLE cellSpacing=0 cellPadding=0 width=100% border=0> <TR> <TD vAlign=top height='62' width='780'>");
				document.write("<img border='0' src='images/mrig_logo.gif' width='45' height='60' alt='MPLUN'>&nbsp;&nbsp;");
				document.write("<a href='index.aspx'><IMG height=52 alt=MRIGNAYANI.COM src='images/mrign.jpg' width=212 border=0></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<IMG alt=MRIGNAYANI.COM src='images/header.gif' border=0></TD></TR>");
				document.write("  <TR><TD vAlign=top height='1' bgcolor='#78124F' width='780'><img border='0' src='images/specer.gif' width='100' height='2'></TD></TR>");
				document.write("  <TR><TD vAlign=top height='19' width='780'><IMG height=1 alt='' src='images/b.gif' width=1><img border='0' src='images/craft1.jpg' width='228' height='24'></TD></TR>");
				document.write("  <TR><TD vAlign=top height='15' width='780'>");
				document.write("      <TABLE cellSpacing=0 cellPadding=0 width='765' border=0 height='1'><TR>");
				document.write("          <TD width='76%' bgcolor='#5B5A5A' height='21'>");
				document.write("  <DIV class=memberarea align=left style='width: 580; height: 13'>");
				document.write("    <p style='margin-left: 10'>Partners or artisans - <a href='login.aspx' class=memberlink> Members Area</a> -");
				document.write(" <a href='viewcart.aspx' class=memberlink> View Cart</a>");
				document.write("  - <a href='checkout.aspx' class=memberlink> Check Out</a> - <a href='register.aspx' class='memberlink'>Registration</a></DIV></TD>");
				document.write("          <TD width='24%' bgcolor='#5B5A5A' height='17'>");
				document.write("            <DIV class=date align=right><p style='margin-right: 10'><script language=javascript>vdate();</script></div>");
				document.write("</TD></TR><TR><TD width='100%' height='1' colspan='2' background='images/dot1_bg.gif'>");
				document.write("            <img border='0' src='images/specer.gif' width='50' height='1'></TD></TR><TR>");
				document.write("          <TD width='100%' height='19' colspan='2' background='images/grad1.jpg'>");
				document.write("            <table border='0' width='100%' cellspacing='0' cellpadding='0' height='31'>");
				document.write("              <tr><td width='53%' height='31'>");
				document.write("                  <DIV class=search align=right>Search&nbsp;&nbsp;</b></Div></td>");
				document.write("<td width='15%' height='31'><Div class=txtbox><input type='text' name='search' size='15'></Div> </td>");
				document.write("                <td width='3%' height='31'>");
				document.write("                  <p align='center'><input type='radio' value='mrign' checked name='src'></td>");
				document.write("                <td width='11%' height='31'>");
				document.write("                  <DIV class=searchname align=left>Mrignayani</font></td>");
				document.write("<td width='3%' height='31'>");
				document.write("  <p align='center'><input type='radio' value='google' name='src'></td>");
				document.write("                  <td width='7%' height='31'>");
				document.write("                  <DIV class=searchname align=left>Google</Div></td>");
				document.write("  <td width='6%' height='31'>");
				document.write("  <p align='center'><IMG height=16 alt=Go src='images/go.gif' onclick=valid_search(); width=28 border=0></td>");
				document.write("<td width='2%' height='31'></td>");
				document.write("                </tr></table> </TD></TR> </TABLE></TD></TR><TR>");
				document.write("    <TD vAlign=top height='1' background='images/dot1_bg.gif' width='780'>");
				document.write("      <IMG height=1 alt='' src='images/b.gif' width=1></TD></TR>");
				document.write("</TABLE>");
			}
			
			function footer()
			{
				document.write("<TABLE cellSpacing=0 cellPadding=0 width=100% border=0 height='71'>");
				document.write("  <TR vAlign=top>");
				document.write("    <TD align=middle height=70 bgcolor='#FFFCF1'>");
				document.write("      <p align='center'><img src='images/bottom1.jpg' border='0'  height='65'>");
				document.write("    </TD></TR>");
				document.write("  <TR vAlign=top>");
				document.write("    <TD align=middle height=52 bgcolor='#FFFCF1'>");
				document.write("      <DIV class=bottom align=center><font color='#78124F'><a href='aboutus.aspx' class='bottomlink'>About");
				document.write("        Us</a> : <a href='branches.aspx' class='bottomlink'>Branches</a> :");
				document.write("        <a href='contactus.aspx' class='bottomlink'>Feedback</a> : <a href='privacy.aspx' class='bottomlink'>Disclaimer</a> :");
				document.write("        <a href='contactus.aspx' class='bottomlink'>Contact Us</a><br>");
				document.write("        &nbsp;<BR>&nbsp;</font><b><font color='#000000'>Website is financially assisted by the office of");
				document.write("      the Development Commissioner (Handicrafts)<br>");
				document.write("      Govt. of India, Ministry of Textiles, New Delhi</font></b><font color='#78124F'><br>");
				document.write("      Payment Gateway And Merchant Account Powered By CCAvenue.</Div></font>");
				document.write("    </TD></TR>");
				document.write("  <TR vAlign=top>");
				document.write("    <TD vAlign=middle align=middle height=16 bgcolor='#FFEEB9'>");
				document.write("      <DIV class=bottom align=center style='width: 765; height: 13'><font color='#000000'>Copyright");
				document.write("        © 2006. All Rights Reserved. <b>M P L U N Ltd.</b></font></Div>");
				document.write("    </TD></TR></TABLE>");
			}

			function lmenu()
			{  
				document.write("<table id='tblmenu' border='0' width='137' cellspacing='0' cellpadding='0'>");
				var mylnk=new Array();
				document.write("<tr><TD vAlign=top align=center height='1' colspan='2'><DIV class=producthead align=left>&nbsp;</Div></TD></tr>");
				var mylnk=new Array();
				mylnk[0] = new Array("About us", "aboutus.aspx");
  				mylnk[1] = new Array("Payment Method", "faq.aspx");
				mylnk[2] = new Array("F.A.Q.'s", "faq.aspx");
				mylnk[3] = new Array("Terms &amp; Conditions", "terms.aspx");
				mylnk[4] = new Array("Contact us", "contactus.aspx");
				mylnk[5] = new Array("Rebate Calendar", "index.aspx");
				mylnk[6] = new Array("Privacy, Security and Disclaimer", "privacy.aspx");
				litem = 6
  				var i = 0;
				while(i<=litem)
			{
				document.write("<tr><TD vAlign=middle align=left height='21' width='135'>");
				document.write("<div class=product style='width: 140; height: 22; border-bottom: 1px solid #be7569; padding-left: 10px; padding-top: 5px; padding-bottom: 3px'><b><a href='"+ mylnk[i][1] +"' class=facilitylink>");
				document.write(mylnk[i][0] +"</a></Div></b></TD></tr><tr>");
				i++;
			}
				document.write("</table>");
				
			}