$(document).ready(function(){
	$('#boximagecm1').hover(
		function(){ 
 			$(this).fadeOut(700);$(this).fadeIn(700);
			$(this).addClass("boximagecm2");
		},
		function(){ 
			$(this).removeClass("boximagecm2"); 
		}
	)
$('#boximagecm2').hover(
		function(){ 
 			$(this).fadeOut(700);$(this).fadeIn(700);
			$(this).addClass("boximagecm2");
		},
		function(){ 
			$(this).removeClass("boximagecm2"); 
		}
	)
$('#boximagecm3').hover(
		function(){ 
 			$(this).fadeOut(700);$(this).fadeIn(700);
			$(this).addClass("boximagecm2");
		},
		function(){ 
			$(this).removeClass("boximagecm2"); 
		}
	)
$('#boximagecm4').hover(
		function(){ 
 			$(this).fadeOut(700);$(this).fadeIn(700);
			$(this).addClass("boximagecm2");
		},
		function(){ 
			$(this).removeClass("boximagecm2"); 
		}
	)
})
function Toggle(node)
{
	// Unfold the branch if it isn't visible
	if (node.nextSibling.style.display == 'none')
	{
		// Change the image (if there is an image)
		if (node.children.length > 0)
		{
			if (node.children.item(0).tagName == "IMG")
			{
				node.children.item(0).src = "images/minus.gif";
			}
		}

		node.nextSibling.style.display = '';
	}
	// Collapse the branch if it IS visible
	else
	{
		// Change the image (if there is an image)
		if (node.children.length > 0)
		{
			if (node.children.item(0).tagName == "IMG")
			{
				node.children.item(0).src = "images/plus.gif";
			}
		}

		node.nextSibling.style.display = 'none';
	}

}
	function check_form_sigh_up()
	{
	
		if(document.frmemail.email.value=='')
		{
		alert ("Please enter a valid email address");
		document.frmemail.email.focus();
		return false;
		}
		remail=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/;
	     if(!remail.test(document.frmemail.email.value)){
		    alert("Please enter a valid email address !")
			document.frmemail.email.focus();
		    return false
		}else return true
		
	}
	
	
	 $(document).ready(function(){
 postionbanner()
 function postionbanner(){
    var sizewindow=$(document).width();   // returns height of browser viewport
	var totalleftright = parseInt((sizewindow - 1000)/2);
	var right = totalleftright;
	var left = totalleftright;
	
	if($.browser.name == 'firefox'){
		right = right - 10;
		left = left + 241;
				leftlogo =  left - 241;
	}else{
		if($.browser.versionX == 6){
			right = right - 8;
			left = left + 231;
			leftlogo =  left - 241;
		}else if($.browser.versionX == 8){
			right = right - 12;
			left = left + 233;
			leftlogo =  left - 239;
		}else{
			right = right - 12;
			left = left + 241;
			leftlogo =  left - 241;
		}
	}
	
	$('#bannerimg').css({
			'right': right,
			'left': left,
			'position': 'absolute',
			'top': '0px'
			});
	}
	$('#logoleft').css({
		'left' : leftlogo,
		'position': 'absolute',
		'top': '0px'
	})
	
	$('#langen').click(function(){
			 changerLang(2);
			 document.frmlang.submit();
		})
		$('#langvi').click(function(){
			 changerLang(1);
			 document.frmlang.submit();
		})
		function changerLang(id){
			
			$('#langID').val(id);
		}
 });
	 
	 
