function flashBanner(banner,height){

var cont="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='780' height='"+height+"'><param name='movie' value='flash/"+banner+".swf' /><param name='quality' value='high' /><embed src='flash/"+banner+".swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='780' height='"+height+"'></embed></object>";

document.getElementById('index_top').innerHTML=cont;

}

function showProduct(a){
	if(a){
	window.location=a;
	}
}

var req7 = null;

function validation(check){
	
	if (check.name.value.length == 0) 
	{	
		alert("Please enter your name!");
		check.name.focus();
		return false;
	}	

	if (check.email.value.length == 0) 

	{	
		alert("Please enter your email!");
		check.email.focus();
		return false;

	}	
	if (check.email.value){
	// check to see if email field is valid
		var emailformat=/^.+@.+\..{2,3}$/;
		if (!(emailformat.test(check.email.value))){
		// tell client that you need the email address
			alert("Please enter a valid email address")
			// send the cursor to the email field
			check.email.focus()
			//return false to abort the submission
			return false
		}
	}
	if(check.name.value.length!=0 && check.email.value.length!=0){
		newsletter(check.name.value,check.email.value)
	}
}

var req7 = null;

function newsletter(name,email){

try
		{
			req7 = new XMLHttpRequest();
		}
		catch (error)
		{
			try
			{
				req7 = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (error)
			{	
				req7 = null;
				return false;
			}
		}
		
		url="newsletter.php?name="+name+"&email="+email;
		
		req7.onreadystatechange = onreadystatechangeNewsletter;
		req7.open("GET",url,true);
		req7.send(null);
		return false;
}

function onreadystatechangeNewsletter(){
	if (req7.readyState == 4)
	{
		// If the data was retrieved successfully
		try
		{
			if (req7.status == 200)
			{
				document.getElementById("col_newsletter").innerHTML=req7.responseText;
				
			}
			// IE returns a status code of 0 on some occasions, so ignore this case
			else if (req7.status != 0)
			{
				alert("There was an error while retrieving the URL: " + req7.statusText);
			}
		}

		catch (error)
		{
		alert("error");
		}
	}
	else{
	document.getElementById("col_newsletter").innerHTML="<img src='images/loader.gif' />";
	}
	return true;
}

function contactform(check1){

	if (check1.name.value.length == 0) 
	{	
		alert("Please enter your name!");
		check1.name.focus();
		return false;
	}	
	if (check1.phone.value.length == 0) 
	{	
		alert("Please enter your phone!");
		check1.phone.focus();
		return false;
	}	

	if (check1.email.value){
	// check to see if email field is valid
		var emailformat=/^.+@.+\..{2,3}$/;
		if (!(emailformat.test(check1.email.value))){
		// tell client that you need the email address
			alert("Please enter a valid email address")
			// send the cursor to the email field
			check1.email.focus()
			//return false to abort the submission
			return false
		}
	}
}
