$(document).ready(function(){
    
	    $(".slidingDiv").hide();
        $(".show_hide").show();
	
	$('.show_hide').click(function(){
	$(".slidingDiv").slideToggle();

	});
});

function submitonEnter(event)
{
	if(/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent))
	{
		return;
	}
	else
	{
		var keycode = event.keyCode;
		if(keycode == "13")
			document.getElementById('btnCall').click();
	}
}

function validate_callme()
{
	var f = document.frmCall;
	//document.getElementById('txtPhone2').style.borderColor="#006633";
	if(f.txtPhone1.value == "")
	{
		//document.getElementById('txtPhone1').style.borderColor="red";
		alert("Check Your Phone Entry");
		f.txtPhone1.focus();
		return false;
	}
	else if(f.txtPhone2.value == "")
	{
		alert("Check Your Phone Entry");
		//document.getElementById('txtPhone2').style.borderColor="red";
		f.txtPhone2.focus();
		return false;
	}
	else if(isNaN(f.txtPhone2.value))
	{
		alert("Check Your Phone Entry");
		//document.getElementById('txtPhone2').style.borderColor="red";
		f.txtPhone2.focus();
		return false;
	}
	else if(f.txtPhone3.value == "")
	{
		alert("Check Your Phone Entry");
		//document.getElementById('txtPhone3').style.borderColor="red";
		f.txtPhone3.focus();
		return false;
	}
	else if(isNaN(f.txtPhone3.value))
	{
		alert("Check Your Phone Entry");
		//document.getElementById('txtPhone3').style.borderColor="red";
		f.txtPhone3.focus();
		return false;
	}
	else if(f.txtPhone3.value.length > 4)
	{
		alert("Check Your Phone Entry");
		//document.getElementById('txtPhone3').style.borderColor="red";
		f.txtPhone3.focus();
		return false;
	}
	else if(f.txtWhenCall.value == "")
	{
		alert("Please enter When to Call");
		//document.getElementById('txtWhenCall').style.borderColor="red";
		f.txtWhenCall.focus();
		return false;
	}
	else
		return true;
}

function validate_enq()
{
	var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	var f = document.frmEnquiry;
	if(f.txtName.value == "")
	{
		document.getElementById('error_p').innerHTML = "&nbsp;&nbsp;Enter Name";
		document.getElementById('error_p').style.display = "block";
		f.txtName.focus();
		return false;
	}
	else if(f.txtEmail.value == "")
	{
		document.getElementById('error_p').innerHTML = "&nbsp;&nbsp;Enter Email";
		document.getElementById('error_p').style.display = "block";
		f.txtEmail.focus();
		return false;
	}
	else if(reg.test(f.txtEmail.value) == false)
	{
		document.getElementById('error_p').innerHTML = "&nbsp;&nbsp;Enter Valid Email";
		document.getElementById('error_p').style.display = "block";
		f.txtEmail.focus();
		return false;
	}
	else if(f.txtContactNo.value == "")
	{
		document.getElementById('error_p').innerHTML = "&nbsp;&nbsp;Enter Contact No.";
		document.getElementById('error_p').style.display = "block";
		f.txtContactNo.focus();
		return false;
	}
	else if(isNaN(f.txtContactNo.value))
	{
		document.getElementById('error_p').innerHTML = "&nbsp;&nbsp;Enter Valid Contact No.";
		document.getElementById('error_p').style.display = "block";
		f.txtContactNo.focus();
		return false;
	}
	else if(f.txtContactNo.value.length < 10)
	{
		document.getElementById('error_p').innerHTML = "&nbsp;&nbsp;Enter Valid Contact No.";
		document.getElementById('error_p').style.display = "block";
		f.txtContactNo.focus();
		return false;
	}
	else if(f.cboTimetoCall.selectedIndex == 0)
	{
		document.getElementById('error_p').innerHTML = "&nbsp;&nbsp;Select Time to Call";
		document.getElementById('error_p').style.display = "block";
		f.cboTimetoCall.focus();
		return false;
	}
	else
		return true;
}

function show_sec()
{
	document.getElementById('call_sec').style.display = "";
	document.getElementById('call_btn').style.display = "none";
}


function popup(name)
{
testwindow= window.open (name, "Defenition","menubar=0,toolbar=0,location=0,status=0,scrollbars=0,width=620,height=600");
testwindow.moveTo(200,0);
if (window.focus) {newwindow.focus()} return false;
}
