// JavaScript Document

function shw(im)
{
document.getElementById("abcd").src=im;
}



var baseopacity=30

function slowhigh(which2){
imgobj=which2
browserdetect=which2.filters? "ie" : typeof which2.style.MozOpacity=="string"? "mozilla" : ""
instantset(baseopacity)
highlighting=setInterval("gradualfade(imgobj)",50)
}

function slowlow(which2){
cleartimer()
instantset(baseopacity)
}

function instantset(degree){
if (browserdetect=="mozilla")
imgobj.style.MozOpacity=degree/100
else if (browserdetect=="ie")
imgobj.filters.alpha.opacity=degree
}

function cleartimer(){
if (window.highlighting) clearInterval(highlighting)
}

function gradualfade(cur2){
if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.1, 0.99)
else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}



function show(frm)
{
      document.getElementById("compa").style.display = frm.company.checked ? '': 'none';
}
function show1(frm)
{
      document.getElementById("doubl").style.display = frm.double.checked ? '': 'none';
}
function show2(frm)
{
      document.getElementById("group1").style.display = frm.group.checked ? '': 'none';
}


//** Validation**//
function checkform ()
{

  // ** START **
  if (eventregistration.fname.value == "") {
    alert( "Please enter your First Name" );
    eventregistration.fname.focus();
    return false ;
  }
  
  if (eventregistration.lname.value == "") {
    alert( "Please enter your Last Name" );
    eventregistration.lname.focus();
    return false ;
  }
  
  if (eventregistration.phone.value == "")
	{
		alert("Please Enter Your Phone Number");
		eventregistration.phone.focus();
		return false ;
	}
	if (isNaN(eventregistration.phone.value))
	{
		alert("Invalid Phone Number");
		eventregistration.phone.select();
		return false;
	}
  
  var email = eventregistration.email.value;
  if (email == "") {
    alert( "Please enter your Email Address" );
    eventregistration.email.focus();
    return false ;
  }
  
  if (!email.match(/^[\w\.\-]+@([\w\-]+\.)+[a-zA-Z]+$/))
	{
		alert("Please enter a valid Email Address");
		eventregistration.email.select();
		return false;
	}
	
  // ** END **
  return true ;
}