
// Flash and CSS init (c) Agents.se - v3.0

//var flashver = deconcept.SWFObjectUtil.getPlayerVersion()['major'];

// CSS Browser Selector   v0.2.3
// Documentation:         http://rafael.adm.br/css_browser_selector
var css_browser_selector = function() {
	var 
		ua = navigator.userAgent.toLowerCase();
		is = function(t){ return ua.indexOf(t) != -1; },
		h = document.getElementsByTagName('html')[0],
		b = (!(/opera|webtv/i.test(ua)) && /msie (\d)/.test(ua)) ? ((is('mac') ? 'ieMac ' : '') + 'ie ie' + RegExp.$1)
			: is('gecko/') ? 'gecko' : is('opera') ? 'opera' : is('konqueror') ? 'konqueror' : is('applewebkit/') ? 'webkit safari' : is('mozilla/') ? 'gecko' : '',
		os = (is('x11') || is('linux')) ? ' linux' : is('mac') ? ' mac' : is('win') ? ' win' : '';
	var c = b+os+' js';
	h.className += h.className?' '+c:c;
}();


function checkEmail(elem){
   var field = document.getElementById(elem);
   var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
   if (field.value.length ==0)
		return false;

   if(field.value.match(emailExp))
		   return true;
   else 
		   return false;
   
}


function check_form(form_id)
{
	
	if (document.getElementById('Name').value=="")
	{
		alert("Please fill in your Name.");
		return false;
	}
	if (document.getElementById('Email').value=="")
	{
		alert("Please fill in your E-mail.");
		return false;
	}
	if (!checkEmail('Email'))
	{
		alert ("Your email address is not valid.");
		return false;
	}
	
	document.getElementById(form_id).submit();
}


function windowopen(url)
{
               
                window.open (url, "mywindow","location=0,menubar=0,directories=0,status=0,toolbar=0,resizable=1,height=150,width=400");
}