/*script for sanchit technologies made by Er. Pradeep kr. */



/********function for main flash**********************/

function mainflash()
{
document.write('<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 height="173" width="914">');
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="Quality" value="High">');
document.write('<param name="Menu" value="0">');
document.write('<param name="Scale" value="NoBorder">');
document.write('<param name="ProfilePort" value="0">');
document.write('<embed src="main_flash.swf" menu="false" quality="best"  wmode="transparent" bgcolor="#000000" width="914" height="173" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
document.write('</OBJECT>');
}

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


//function for enquiry form.........

function check_enquiryform()
{
	
	docf=document.getElementById("frm");
	
	if(docf.company.value=='')
	{
		alert("Please enter Company Name");
		docf.company.focus();
		return false;
	}
	
	if(docf.address.value=='')
	{
		alert("Please enter address");
		docf.address.focus();
		return false;
	}

	if(docf.country.value=='Select a country')
	{
		alert("Please enter Country Name");
		docf.country.focus();
		return false;
	}

if(docf.state.value=='')
	{
		alert("Please enter state");
		docf.state.focus();
		return false;
	}
	if(docf.city.value=='')
	{
		alert("Please enter City Name");
		docf.city.focus();
		return false;
	}

	
	if(docf.email.value=='')
	{
		alert("Please enter your Email ID");
		docf.email.focus();
		return false;
	}

	if(docf.phone.value=='')
	{
		alert("Please enter your Phone");
		docf.phone.focus();
		return false;
	}


if(docf.code_field.value=='')
	{
		alert("Please enter the Code above in Figure");
		docf.code_field.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 enlarge(img,cod,len,brd,titl)
{	
	var win = window.open("","win",'width='+brd+',height='+len+',resizable=yes'); // a window object
	win.document.open("text/html","replace");
	win.document.write("<HTML><HEAD><TITLE>"+titl+"</TITLE></HEAD><BODY topmargin='0' leftmargin='0'><embed width='100%' height='100%' src="+img+"></BODY></HTML>");
	win.document.close();	
}