var keepstatic=1 //specify whether menu should stay static 0=non static (works only in IE4+)
      var menucolor="#A5AAA" //specify menu color
      var submenuwidth=225 //specify sub menus' color
function header1()
{
	document.write('<table border="0" cellpadding="0" cellspacing="0" width="100%">');
	document.write('<tr>');
	document.write('<td width="25%"><img border="0" src="images/top1.jpg" width="236" height="30" alt="NAAC ENERGY CONTROLS PVT LIMITED"></td>');
	document.write('<td width="75%" height="30" align="right"><embed width="298" height="20" src="toplinks.swf"></td>');
	document.write('</tr>');
	document.write('<tr><td width="25%" height="34" background="images/link-bg.jpg"><img border="0" src="images/top2.jpg" width="236" height="34" alt="NAAC ENERGY CONTROLS PVT LIMITED"></td><td width="75%" height="34" background="images/link-bg.jpg">');
}
function header2()
{
	document.write('</td></tr><tr><td width="25%"><img border="0" src="images/top3.jpg" width="236" height="26" alt="NAAC ENERGY CONTROLS PVT LIMITED"></td><td width="75%" height="26"></td></tr>');
	document.write('</table>');
}
/*function header1()
{
document.write('<table border="0" cellpadding="0" cellspacing="0" width="100%">');
document.write('<tr>');
document.write('<td width="30%"><img border="0" src="images/top1.jpg" width="236" height="30"></td>');
document.write('<td width="70%" height="30"><p align="right"><embed width="298" height="20" src="toplinks.swf"></td>');
document.write('</tr>');
document.write('<tr><td width="30%" height="34" background="images/link-bg.jpg"><img border="0" src="images/top2.jpg" width="236" height="34"></td><td width="70%" height="34" background="images/link-bg.jpg">');
document.write('<script type="text/javascript">function Go(){return}</script><script type="text/javascript" src="style/exmplmenu_var1.js"></script><script type="text/javascript" src="style/menu_com.js"></script>');
document.write('</td></tr><tr><td width="30%"><img border="0" src="images/top3.jpg" width="236" height="26"></td><td width="70%" height="26"></td></tr>');
document.write('</table>');
}*/

function home()
{
document.write('<table border="0" cellpadding="0" cellspacing="0" width="100%">');
document.write('<tr>');
document.write('<td width="30%"><img border="0" src="images/top1.jpg" width="236" height="30"></td>');
document.write('<td width="70%" height="30"><p align="right"><map name="FPMap0"><area href="index.html" shape="rect" coords="10, 0, 64, 19"><area href="contact-us.html" shape="rect" coords="82, 1, 143, 18"><area href="faq.html" shape="rect" coords="162, 0, 218, 19"><area href="sitemap.html" shape="rect" coords="236, 1, 290, 19"></map><img border="0" src="images/toplinks-image.jpg" usemap="#FPMap0" width="298" height="20"></td>');
document.write('</tr>');
document.write('<tr><td width="30%" height="34" background="images/link-bg.jpg"><img border="0" src="images/top2.jpg" width="236" height="34"></td><td width="70%" height="34" background="images/link-bg.jpg">');
//document.write('<script type="text/javascript">function Go(){return}</script><script type="text/javascript" src="style/exmplmenu_var1.js"></script><script type="text/javascript" src="style/menu_com.js"></script>');
document.write('</td></tr><tr><td width="30%"><img border="0" src="images/top3.jpg" width="236" height="26"></td><td width="70%" height="26"></td></tr>');
document.write('</table>');
}

function right()
{
	
	document.write('<table border="0" cellpadding="0" cellspacing="0" width="223">');
	document.write('<tr><td width="223">');
	document.write('<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber20">');
	document.write('<tr><td width="100%" valign="top" bgcolor="#ffffff" align="center">');
	document.write('<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0 width="223" height="201">');
	document.write('<param name="_cx" value="26564">');
	document.write('<param name="_cy" value="4948">');
	document.write('<param name="FlashVars" value>');
	document.write('<param name="Movie" value="products1.swf">');
	document.write('<param name="Src" value="products1.swf">');
	document.write('<param name="WMode" value="Transparent">');
	document.write('<param name="Play" value="0">');
	document.write('<param name="Loop" value="-1">');
	document.write('<param name="Quality" value="High">');
	document.write('<param name="SAlign" value>');
	document.write('<param name="Menu" value="0">');
	document.write('<param name="Base" value>');
	document.write('<param name="AllowScriptAccess" value="always">');
	document.write('<param name="Scale" value="NoBorder">');
	document.write('<param name="DeviceFont" value="0">');
	document.write('<param name="EmbedMovie" value="0">');
	document.write('<param name="BGColor" value="FFFFFF">');
	document.write('<param name="SWRemote" value>');
	document.write('<param name="MovieData" value>');
	document.write('<param name="SeamlessTabbing" value="1">');
	document.write('<param name="Profile" value="0">');
	document.write('<param name="ProfileAddress" value>');
	document.write('<param name="ProfilePort" value="0">');
	document.write('<param name="AllowNetworking" value="all"><embed src="products1.swf" menu="false" quality="best" scale="noborder" wmode="transparent" bgcolor="#FFFFFF" width="223" height="201" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></OBJECT>');
	document.write('</td></tr>');
	document.write('<tr><td width="100%" valign="top" height="10"></td></tr>');
	document.write('<tr><td width="100%" valign="top" align="center"></td></tr></table>');
	document.write('</td></tr>');
	document.write('<tr><td width="223">');
	document.write('</td></tr></table>');
	/*
	<!--Right Start-->
	document.write('<table border="0" cellpadding="0" cellspacing="0" width="223">');
	document.write('<tr><td width="100%"><p align="center"><img border="0" src="images/services-image.jpg" width="215" height="32"></td></tr>');
	document.write('<tr><td width="100%"><div align="center"><center>');
	document.write('<table border="0" cellpadding="3" cellspacing="0" width="90%">');
	document.write('<tr><td width="100%" height="5" colspan="2"></td></tr>');	
	document.write('<tr><td width="5%"><img border="0" src="images/arrow-2.jpg" width="12" height="11"></td>');
	document.write('<td width="95%"><a href="background.html" class="rightlink">Background</a></td>');
	document.write('</tr><tr><td width="5%"><img border="0" src="images/arrow-2.jpg" width="12" height="11"></td>');
	document.write('<td width="95%"><a href="power-quality&analysis.html" class="rightlink">Power Quality & Analysis</a></td>');
	document.write('</tr><tr><td width="5%"><img border="0" src="images/arrow-2.jpg" width="12" height="11"></td>');
	document.write('<td width="95%"><p align="justify"><a href="warehousing.html" class="rightlink">Data warehousing</a></p></td>');
	document.write('</tr><tr><td width="5%"><img border="0" src="images/arrow-2.jpg" width="12" height="11"></td>');
	document.write('<td width="95%"><a href="load-flow-analysis.html" class="rightlink">Load Flow Analysis</a></td>');
	document.write('</tr><tr><td width="5%"><img border="0" src="images/arrow-2.jpg" width="12" height="11"></td>');
	document.write('<td width="95%"><a href="load-monitoring-services.html" class="rightlink">Load Monitoring Services</a></td>');
	document.write('</tr>');
	document.write('<tr><td width="5%"><img border="0" src="images/arrow-2.jpg" width="12" height="11"></td>');
	document.write('<td width="95%"><a href="power-factor-study.html" class="rightlink">Power Factor Study</a></td>');
	document.write('</tr>');
	document.write('<tr><td width="5%"><img border="0" src="images/arrow-2.jpg" width="12" height="11"></td>');
	document.write('<td width="95%"><a href="harmonic-study.html" class="rightlink">Harmonic Study</a></td>');
	document.write('</tr>');
	document.write('<tr><td width="5%"><img border="0" src="images/arrow-2.jpg" width="12" height="11"></td>');
	document.write('<td width="95%"><a href="transient-flicker-analysis.html" class="rightlink">Transient & Flicker Analysis</a></td>');
	document.write('</tr></table></center></div></td></tr>');
	document.write('<tr><td width="100%" height="10"></td></tr>');
	document.write('<tr><td width="100%"><p align="center"><img border="0" src="images/products_solution-image.jpg" width="215" height="32"></td></tr>');
	document.write('<tr><td width="100%"><div align="center"><center><table border="0" cellpadding="3" cellspacing="0" width="90%">');
	document.write('<tr><td width="100%" height="5" colspan="2"></td></tr>');
	document.write('<tr><td width="5%"><img border="0" src="images/arrow-2.jpg" width="12" height="11"></td>');
	document.write('<td width="95%"><a href="power-factor-correction.html" class="rightlink">Power Factor Correction</a></td>');
	document.write('</tr><tr><td width="5%"><img border="0" src="images/arrow-2.jpg" width="12" height="11"></td>');
	document.write('<td width="95%"><a href="harmonic-filtration.html" class="rightlink">Harmonic Filtration</a></td>');
	document.write('</tr><tr><td width="5%"><img border="0" src="images/arrow-2.jpg" width="12" height="11"></td>');
	document.write('<td width="95%"><p align="justify"><a href="data-warehousing.html" class="rightlink">Data warehousing</a></p></tr>');
	document.write('<tr><td width="5%"><img border="0" src="images/arrow-2.jpg" width="12" height="11"></td>');
	document.write('<td width="95%"><a href="energy-managment-system.html" class="rightlink">Energy Management System</a></td>');
	document.write('</tr>');
	document.write('<tr><td width="5%"><img border="0" src="images/arrow-2.jpg" width="12" height="11"></td>');
	document.write('<td width="95%"><a href="m3000.html" class="rightlink">M3000 Portable Power Quality</a></td>');
	document.write('</tr>');
	document.write('</table></center></div></td></tr>');
	document.write('<tr><td width="100%" height="70"></td></tr></table>
	<!--Right End-->
	*/
	
}


function footer()
{
	document.write('<table border="0" cellpadding="0" cellspacing="0" width="100%">');
	document.write('<tr><td colspan="7" height="10"></td></tr>');
	document.write('<tr><td width="14%" align="center"><a href="index.html" class="footer">Home</a></td>');
	document.write('<td width="14%" align="center"><a href="company-profile.html" class="footer">Profile</a></td>');
	document.write('<td width="14%" align="center"><a href="whyus.html" class="footer">Why Us</a></td>');
	document.write('<td width="14%" align="center"><a href="faq.html" class="footer">FAQ</a></td>');
	document.write('<td width="14%" align="center"><a href="enquiry.html" class="footer">Enquiry</a></td>');
	document.write('<td width="15%" align="center"><a href="online-data-form.html" class="footer">Online Data Form</a></td>');
	document.write('<td width="15%" align="center"><a href="sitemap.html" class="footer">Sitemap</a></td>');
	document.write('<tr><td colspan="7" height="10"></td></tr>');
	document.write('</tr></table>');

}

function copyright()
{

document.write('<table width="100%"><tr><td width="10%"><a href="links.html" class="footer">Links</td><td width="90%" align="center"><font class="copyright">© Copyright NAAC ENERGY CONTROLS PVT LIMITED  &nbsp; ||  &nbsp; Site Powered by <a href="http://www.emavens.com" target="new" class="copyright_emavens"><img src="images/emslogo.png" height="16" width="58" border="0"></a></font></td></tr></table>');
}


function enquiryform()
{
	docf=document.frm;
	if(docf.name.value=="")
	{
		alert("Please Enter your Name");
		docf.name.focus();
		return false;
	}
	if(docf.designation.value=="")
	{
		alert("Please Enter your Degisnation");
		docf.designation.focus();
		return false;
	}
	if(docf.company.value=="")
	{
		alert("Please Enter your Company Name");
		docf.company.focus();
		return false;
	}
	if(docf.address.value=="")
	{
		alert("Please Enter your Address");
		docf.address.focus();
		return false;
	}
	if(docf.email.value=="")
	{
		alert("Please Enter your Email");
		docf.email.focus();
		return false;
	}
	return validate_form(docf);

}

function validate_email(field,alerttxt)
{
	with (field)
	{
		apos=value.indexOf("@")
		dotpos=value.lastIndexOf(".")
		if (apos<1||dotpos-apos<2) 
  		{
  			alert(alerttxt);
  			return false;
  		}
		else 
		{
			return true;
		}
	}
	
}

function validate_form(thisform)
{
	with (thisform)
	{
		if (validate_email(email,"Not a valid e-mail address!")==false)
  		{
  			email.focus();
  			return false;
  		}
	}
	
}

function homemain()
{
	document.write('<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0 height=256 width=100%>');
	document.write('<param name="_cx" value="26564">');
	document.write('<param name="_cy" value="4948">');
	document.write('<param name="FlashVars" value>');
	document.write('<param name="Movie" value="main-flash.swf">');
	document.write('<param name="Src" value="main-flash.swf">');
	document.write('<param name="WMode" value="Transparent">');
	document.write('<param name="Play" value="0">');
	document.write('<param name="Loop" value="-1">');
	document.write('<param name="Quality" value="High">');
	document.write('<param name="SAlign" value>');
	document.write('<param name="Menu" value="0">');
	document.write('<param name="Base" value>');
	document.write('<param name="AllowScriptAccess" value="always">');
	document.write('<param name="Scale" value="NoBorder">');
	document.write('<param name="DeviceFont" value="0">');
	document.write('<param name="EmbedMovie" value="0">');
	document.write('<param name="BGColor" value="FFFFFF">');
	document.write('<param name="SWRemote" value>');
	document.write('<param name="MovieData" value>');
	document.write('<param name="SeamlessTabbing" value="1">');
	document.write('<param name="Profile" value="0">');
	document.write('<param name="ProfileAddress" value>');
	document.write('<param name="ProfilePort" value="0">');
	document.write('<param name="AllowNetworking" value="all"><embed src="main-flash.swf" menu="false" quality="best" scale="noborder" wmode="transparent" bgcolor="#FFFFFF" height=256 width=100% TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></OBJECT>');

}


function energyicon()
{
	document.write('<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0 height=88 width=88>');
	document.write('<param name="_cx" value="26564">');
	document.write('<param name="_cy" value="4948">');
	document.write('<param name="FlashVars" value>');
	document.write('<param name="Movie" value="energy-icon.swf">');
	document.write('<param name="Src" value="energy-icon.swf">');
	document.write('<param name="WMode" value="Transparent">');
	document.write('<param name="Play" value="0">');
	document.write('<param name="Loop" value="-1">');
	document.write('<param name="Quality" value="High">');
	document.write('<param name="SAlign" value>');
	document.write('<param name="Menu" value="0">');
	document.write('<param name="Base" value>');
	document.write('<param name="AllowScriptAccess" value="always">');
	document.write('<param name="Scale" value="NoBorder">');
	document.write('<param name="DeviceFont" value="0">');
	document.write('<param name="EmbedMovie" value="0">');
	document.write('<param name="BGColor" value="FFFFFF">');
	document.write('<param name="SWRemote" value>');
	document.write('<param name="MovieData" value>');
	document.write('<param name="SeamlessTabbing" value="1">');
	document.write('<param name="Profile" value="0">');
	document.write('<param name="ProfileAddress" value>');
	document.write('<param name="ProfilePort" value="0">');
	document.write('<param name="AllowNetworking" value="all"><embed src="energy-icon.swf" menu="false" quality="best" scale="noborder" wmode="transparent" bgcolor="#FFFFFF" height=88 width=88 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></OBJECT>');

}







function homeleft()
{
	document.write('<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0 WIDTH="241" HEIGHT="91">');
	document.write('<param name="_cx" value="26564">');
	document.write('<param name="_cy" value="4948">');
	document.write('<param name="FlashVars" value>');
	document.write('<param name="Movie" value="news-banner.swf">');
	document.write('<param name="Src" value="news-banner.swf">');
	document.write('<param name="WMode" value="Transparent">');
	document.write('<param name="Play" value="0">');
	document.write('<param name="Loop" value="-1">');
	document.write('<param name="Quality" value="High">');
	document.write('<param name="SAlign" value>');
	document.write('<param name="Menu" value="0">');
	document.write('<param name="Base" value>');
	document.write('<param name="AllowScriptAccess" value="always">');
	document.write('<param name="Scale" value="NoBorder">');
	document.write('<param name="DeviceFont" value="0">');
	document.write('<param name="EmbedMovie" value="0">');
	document.write('<param name="BGColor" value="FFFFFF">');
	document.write('<param name="SWRemote" value>');
	document.write('<param name="MovieData" value>');
	document.write('<param name="SeamlessTabbing" value="1">');
	document.write('<param name="Profile" value="0">');
	document.write('<param name="ProfileAddress" value>');
	document.write('<param name="ProfilePort" value="0">');
	document.write('<param name="AllowNetworking" value="all"><embed src="news-banner.swf" menu="false" quality="best" scale="noborder" wmode="transparent" bgcolor="#FFFFFF" WIDTH="241" HEIGHT="91" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></OBJECT>');

}

function homeright()
{
	document.write('<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0 WIDTH="135" HEIGHT="93">');
	document.write('<param name="_cx" value="26564">');
	document.write('<param name="_cy" value="4948">');
	document.write('<param name="FlashVars" value>');
	document.write('<param name="Movie" value="why-banner.swf">');
	document.write('<param name="Src" value="why-banner.swf">');
	document.write('<param name="WMode" value="Transparent">');
	document.write('<param name="Play" value="0">');
	document.write('<param name="Loop" value="-1">');
	document.write('<param name="Quality" value="High">');
	document.write('<param name="SAlign" value>');
	document.write('<param name="Menu" value="0">');
	document.write('<param name="Base" value>');
	document.write('<param name="AllowScriptAccess" value="always">');
	document.write('<param name="Scale" value="NoBorder">');
	document.write('<param name="DeviceFont" value="0">');
	document.write('<param name="EmbedMovie" value="0">');
	document.write('<param name="BGColor" value="FFFFFF">');
	document.write('<param name="SWRemote" value>');
	document.write('<param name="MovieData" value>');
	document.write('<param name="SeamlessTabbing" value="1">');
	document.write('<param name="Profile" value="0">');
	document.write('<param name="ProfileAddress" value>');
	document.write('<param name="ProfilePort" value="0">');
	document.write('<param name="AllowNetworking" value="all"><embed src="why-banner.swf" menu="false" quality="best" scale="noborder" wmode="transparent" bgcolor="#FFFFFF" WIDTH="135" HEIGHT="93" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></OBJECT>');

}

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

function registrationform(){

		docf=document.frm;
	if (docf.username.value.length<=0 || frm.username.value == "" ){
		alert("Please enter the user id!");
		docf.username.focus();
		return false;
	}

	if (docf.password.value.length<=0 || frm.password.value == "" ){
		alert("Please enter the password!");
		docf.password.focus();
		return false;
	}

	if (docf.password.value.length<5){
		alert("Password should have minimum of five characters!");
		docf.password.focus();
		return false;
	}
	

	if (docf.cpassword.value.length<=0 || frm.cpassword.value == "" ){
		alert("Please enter the confirm password!");
		docf.cpassword.focus();
		return false;
	}
	
	if (docf.password.value != frm.cpassword.value){
		alert("Your password do not match!");
		docf.cpassword.focus();
		return false;		
	}

	if(docf.address.value=="")
	{
		alert("Plz enter your address");
		docf.address.focus();
		return false;	
	}

	if(docf.phone.value=="")
	{
		alert("Plz enter your phone");
		docf.phone.focus();
		return false;	
	}
	
	if(docf.email.value=="")
	{
		alert("Plz enter your Email");
		docf.email.focus();
		return false;	
	}
	
	return validate_form(docf);

}


function checkloginform()
{
if(document.frm.username.value=="")
	{
	alert("Plz Enter UserName.");
	document.frm.username.focus();
	return false;
}
}