

function fn_form_field_focus (me,val){
	//alert(me.value);
	if (me.value==val){
		me.value="";
	}
}

function fn_form_field_blur (me,val){
	//alert(me.value);
	if (me.value==""){
		me.value=val;
	}
}


function fn_check_form(){
	var Uname=document.forms["footer_form"].Uname.value;
	var Utelephone=document.forms["footer_form"].UTelephone.value;
	var Ucompany=document.forms["footer_form"].UCompany.value;
	var Uemail=document.forms["footer_form"].UEmail.value;
	var Uenquiry=document.forms["footer_form"].Uenquiry.value;
	
		document.forms["footer_form"].Uname.style.backgroundColor="#001E2F";
		document.forms["footer_form"].UTelephone.style.backgroundColor="#001E2F";
		document.forms["footer_form"].UEmail.style.backgroundColor="#001E2F";
		document.forms["footer_form"].Uenquiry.style.backgroundColor="#001E2F";
	
	
	
		var err=0;
	if (Uname=="" || Uname=="Name*"){
		err++;
		document.forms["footer_form"].Uname.style.backgroundColor="#F00";
	}
	if (Utelephone=="" || Utelephone=="Telephone*"){
		err++;
		document.forms["footer_form"].UTelephone.style.backgroundColor="#F00";
	}
//	alert("Email.split(\"@\").length"+Email.split("@").length)
	if (Uemail=="" || Uemail=="Email*" || Uemail.split("@").length!=2 || Uemail.split(".").length<2){
		err++;
		document.forms["footer_form"].UEmail.style.backgroundColor="#F00";
	}
	if (Uenquiry=="" || Uenquiry=="Enquiry*"){
		err++;
		document.forms["footer_form"].Uenquiry.style.backgroundColor="#F00";
	}
	if (err==0){
		//document.forms["footer_form"].submit();
	} else {
		//document.getElementById("submitBT").style.borderColor="#F00";
		//document.getElementById("submitBT").style.backgroundColor="#F99";
		//document.getElementById("err").style.color="#F00";
		//document.getElementById("err").innerHTML="Please add required information *";
		
		alert('Please enter all required information')
	}
	
	
	
	//alert("Uname="+Uname+"\rUtelephone="+Utelephone+"\rUcompany="+Ucompany+"\rUemail="+Uemail+"\rUenquiry="+Uenquiry)
}



function fn_set_flash_pos(){
	document.getElementById("flash_panel").style.display="block";
	fn_repos_flash();
	
}
function fn_set_flash_pos2(){
	document.getElementById("flash_panel").style.display="block";
	fn_repos_flash2();
	
}






function fn_repos_flash(){
  var obj="flash_panel";
  var offsetX=0;
  var toppos=96;
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
	if (myWidth > document.body.offsetWidth) { 
	  myWidth = window.innerWidth-18;	
	  toppos -= 18;
	} 
	//myWidth = document.body.offsetWidth
	//alert(document.body.offsetWidth)
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  	
	Swidth=(myWidth/2)-(962/2)
	Sheight=(myHeight/2)-(582/2)
	document.getElementById(obj).style.left=Swidth+"px"
	document.getElementById(obj).style.top=toppos+"px"
    window.onresize = fn_repos_flash; 
	
}
function fn_repos_flash2(){
  var obj="flash_panel";
  var offsetX=0;
  var toppos=96;
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
	if (myWidth > document.body.offsetWidth) { 
	  myWidth = window.innerWidth-18;	
	  toppos -= 18;
	} 
	//myWidth = document.body.offsetWidth
	//alert(document.body.offsetWidth)
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  	
	Swidth=(myWidth/2)-(962/2)+550;
	Sheight=(myHeight/2)-(582/2);
	document.getElementById(obj).style.left=Swidth+"px"
	document.getElementById(obj).style.top=toppos+"px"
    window.onresize = fn_repos_flash2; 
	
}

/*
function fn_resize(){
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
	if (myWidth > document.body.offsetWidth) { 
	  myWidth = window.innerWidth-18;	
	} 
	//myWidth = document.body.offsetWidth
	//alert(document.body.offsetWidth)
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
	Swidth=(myWidth/2)-(990/2)
	document.getElementById("pageContent").style.left=Swidth+"px"
    window.onresize = fn_resize; 
}

*/
