function getInternetExplorerVersion() {


    var rv = -1; // Return value assumes failure.

    if (navigator.appName == 'Microsoft Internet Explorer') {

        var ua = navigator.userAgent;

        var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");

        if (re.exec(ua) != null)

            rv = parseFloat(RegExp.$1);

    }
	

    return rv;
	


}



    var ver = getInternetExplorerVersion();



    if (ver > -1) 
	{
		


   	
		if (ver > 6)
		{
			var ft = "<script type=\"text/javascript\" src=\"scripts/iepngfix_tilebg.js\"></script>";
			document.write(ft);
			var ft2 = "<link rel=\"stylesheet\" href=\"style-sheet.css\" type=\"text/css\" />";
			document.write(ft2);
			

		}
		else
		{



			var ft2 = "<link rel=\"stylesheet\" href=\"style-sheet-ie6.css\" type=\"text/css\" />";
			document.write(ft2);
		}

    }
	else
	{
		var ft = "<script type=\"text/javascript\" src=\"scripts/iepngfix_tilebg.js\"></script>";
			document.write(ft);
			var ft2 = "<link rel=\"stylesheet\" href=\"style-sheet.css\" type=\"text/css\" />";
			document.write(ft2);
		
	}
	
	
	

//Functions to set height of curvy background image same as that of height of document incuding scrollbar
function setHeight()
{
	var ht = getDocHeight();
	
	//alert(ht);
	
	document.getElementById('curvediv').style.height = ht+"px";
	
	
	
}

function getDocHeight() {
    var D = document;
    return Math.max(
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    );
}




//-----------------------------------------------
// Function to validate contact form
//-----------------------------------------------
function chk_contactform()
{

	var msg = "";
	var emailReegxp = /^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)*\.([a-zA-Z]{2,6})$/;
	
	
	
	if (document.contactform.email.value == "") { msg = msg+"Please fill in Email Address\n";document.contactform.email.focus(); }
	else if (!emailReegxp.test(document.contactform.email.value))
	{
		msg = msg+"Pleas fill in valid Email Address\n";
		document.contactform.email.focus();
	}
	else if (document.contactform.location.value == "") { msg = msg+"Please fill in Location\n";document.contactform.location.focus(); }
	else if (document.contactform.sec_code.value == "") { msg = msg+"Type the characters you see in the picture.\n";document.contactform.sec_code.focus(); }
	
	if (msg != "") { alert(msg); return false;}
	
}








	


