function submitForm() {
	if (document.form1.curbusiness.selectedIndex == -1)
		{
			alert("Please select your Primary Business.");
			document.form1.curbusiness.focus();
			return false;
		}
	else if (document.form1.gtldcurrent.value=='')
		{
			alert("Please enter your Portfolio size.");
			document.form1.gtldcurrent.focus();
			return false;
		}
	else
		{
			document.form1.submit();
		}
}


function showstep1()
{
	document.getElementById("step-1").style.display='block';
	document.getElementById("step-2").style.display='none';
	document.getElementById("step-3").style.display='none';
	document.getElementById("Image2").src='../images/off-business.jpg';
	document.getElementById("Image3").src='../images/off-why.jpg';
	document.getElementById("Image1").src='../images/on-contect.jpg';
}

function showstep2()
{
	document.getElementById("step-1").style.display='none';
	document.getElementById("step-2").style.display='block';
	document.getElementById("step-3").style.display='none';
	document.getElementById("Image3").src='../images/off-why.jpg';
	document.getElementById("Image2").src='../images/on-business.jpg';
	document.getElementById("Image1").src='../images/off-contect.jpg';
}

var bool=false;
var step1 = false;

function chkstep1()
{
	if (document.form1.cname.value=="")
	{
		alert("Please enter the Company Name.");
		document.form1.cname.focus();
		step1 = false;
	}
	else if ((document.form1.url.value=="") || (document.form1.url.value.indexOf('.', 0)==-1))
	{
		alert("Please enter the Company URL.");
		document.form1.url.focus();
		step1 = false;
	}
	else if (document.form1.country[document.form1.country.selectedIndex].value=="0")
	{

		alert("Please enter the Country.");
		document.form1.country.focus();
		step1 = false;
	}
	else if (document.form1.contactperson.value=="")
	{
		alert("Please enter the Contact Person's Name.");
		document.form1.contactperson.focus();
		step1 = false;
	}
	else if ((document.form1.email.value=="") || (document.form1.email.value.indexOf('@',0)==-1) || (document.form1.email.value.indexOf('.',0)==-1))
	{
		alert("Please enter a valid email address.");
		document.form1.email.focus();
		step1 = false;
	}
	else if (document.form1.tel.value=="")
	{
		alert("Please enter the Telephone No.");
		document.form1.tel.focus();
		step1 = false;
	}

	else
	{

		step1 = true;
		document.getElementById("step-1").style.display='none';
		document.getElementById("step-2").style.display='block';
		document.getElementById("step-3").style.display='none';
		document.getElementById("Image3").src='../images/off-why.jpg';
		document.getElementById("Image2").src='../images/on-business.jpg';
		document.getElementById("Image1").src='../images/off-contect.jpg';
	}
}

function chkstep2() {
	if (document.form1.curbusiness.selectedIndex == -1)
		{
			alert("Please select your Primary Business.");
			document.form1.curbusiness.focus();
		}
	else if (document.form1.gtldcurrent.value=='')
		{
			alert("Please enter your Portfolio size.");
			document.form1.gtldcurrent.focus();
		}
	else
		{
			document.getElementById("step-1").style.display='none';
			document.getElementById("step-2").style.display='none';
			document.getElementById("step-3").style.display='block';
			document.getElementById("Image3").src='../images/on-why.jpg';
			document.getElementById("Image2").src='../images/off-business.jpg';
			document.getElementById("Image1").src='../images/off-contect.jpg';
		}
}

function validate()
{

	/*var boxes1;
	boxes1 = document.form1.businessactivities.length ;
	var txtt;
	txtt = '';
	for (i = 0; i < boxes1; i++) {
		if (document.form1.businessactivities[i].checked) {
		txtt = txtt + document.form1.businessactivities[i].value + " "
			}
		}
	var boxes2 = document.form1.portfoliocomp.length ;
	var txt2 = '';

	for (i = 0; i < boxes1; i++) {
		if (document.form1.portfoliocomp[i].checked) {
		txt2 = txt2 + document.form1.portfoliocomp[i].value + " "
			}

	}*/
	/*if (txtt == '') {
		alert('Please select your Business Activity.');
		return false;
	}
	else */
	/*if (txt2 == '')
	{
		alert('Please select your Portfolio Composition.');
		return false;
	}*/
	/*else*/ 
	if(document.form1.parent_registrar.value=='')	
	{
		alert("Please provide Parent Registrar details.");
		document.form1.parent_registrar.focus();
		return false;
	}
	else if(document.form1.brand_names.value=='')	
	{
		alert("Please provide Brand Names you operate.");
		document.form1.brand_names.focus();
		return false;
	}		
	
	else if(document.form1.whereheared[document.form1.whereheared.selectedIndex].value=='nothing')	
	{
		alert("Please let us know from where have you heared about us.");
		document.form1.whereheared.focus();
		return false;
	}
	else if((document.form1.whereheared[document.form1.whereheared.selectedIndex].value=='other') && (document.form1.otherheardfrom.value==""))
	{
		alert("Please let us know from where have you heard about us.");
		document.form1.otherheardfrom.focus();
		return false;
	}
	else
	{
		document.form1.submit();
	}
}


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function chkOther()
{

	if (document.form1.curbusiness.options[5].selected)
		document.getElementById('curbusinessother').style.display = "block";
	else
		document.getElementById('curbusinessother').style.display = "none";
}

function whear()
{
 if (document.form1.whereheared[document.form1.whereheared.selectedIndex].value == 'other')
	document.getElementById('hearedothers').style.display="block";
else
	document.getElementById('hearedothers').style.display="none";
}


