jQuery().ready(function(){
	//$("#gettabs").tabs();	
		// simple accordion
		jQuery('#sidebar').accordion();
		jQuery('#list1b').accordion({
			autoheight: false
		});	
$('#sidebar h3').eq(0).css('background-image','url("images/arrow-hide.gif")');
	});
function chan_other1() 
{
$('#msg6').hide();

	if($('#channel').val() == "Other") 
		{
			$('#other_label').show();
		}
	else 
		{
			$('#msg6').hide();
			$('#other_label').hide();
			
		}
}	
var urlvalidAccess = 0;


$(document).ready(function(){
	
					   
$(".top").click(function(){
 //prevent the default action for the click event
    
 
//get the full url - like mysitecom/index.htm#home
	       // var full_url = this.href;
 //
	        //split the url by # and get the anchor target name - home in mysitecom/index.htm#home
       // var parts = full_url.split("#");
	    //    var trgt = parts[1];
	 
	        //get the top offset of the target anchor
       // var target_offset = $("#"+trgt).offset();
	    //    var target_top = target_offset.top;
	 
	        //goto that anchor by setting the body scroll top to anchor top
			var targetOffset = $("#header").scrollTop();
			//alert(targetOffset)	
			$(".top").css("backgroundColor","#fafcf2");
	        $('html, body').animate({scrollTop:targetOffset}, 500);						 
})	

$("#header ul li:eq(1)").css({'float':'left','padding-right':'4px'});						   
$("#header ul li:eq(2)").css({'float':'left','padding-right':'8px'});	
$("#header ul li:eq(10)").css({'float':'left','padding-right':'4px','padding-left':'7px'});	
$("#header ul li:nth-child(4)").css("padding","0px");
$("#header ul li:eq(0)").css({'position':'relative','top':'0px'});
$("#header ul li:eq(4)").css({'position':'relative','top':'0px'});
$(".menu li:even").css({'width':'190px'});


$("#header ul li:eq(2)").hover(function(){
$("#header ul li:eq(2) img").attr('src','images/services_over.gif')
$(".menu").show();
},
function(){
$("#header ul li:eq(2) img").attr('src','images/services-normal.gif')
$(".menu").hide();
});	


$("#header ul li:eq(10)").hover(function(){										
$("#header ul li:eq(10) img").attr('src','images/about_overs.gif');
$(".menuAbt").show();
},
function(){
$("#header ul li:eq(10) img").attr('src','images/about-normal.gif');
$(".menuAbt").hide();
});

/*
$("#sidebar div div:eq(0) .prev-next:eq(0) a:first").click(function(){
if($("#sidebar div div:eq(0) input[name='first']:checked").val()==undefined)
{
alert('Please Select an option to proceed further');
return;
}

$("#sidebar div div").hide();
$("#sidebar div div:eq(0) fieldset").hide();
$("#sidebar div div:eq(0)").show();
$("#sidebar div div:eq(0) fieldset:eq(1)").show();

})
*/

/*---------------------First set of questions --------------------------*/

for(var k=0;k<=($("#sidebar div div:eq(0) fieldset").length-1);k++) {
/*--------------------------------- start ----------------*/

if (k != 12) {
$("#sidebar div div:eq(0) fieldset .prev-next:eq("+eval(k)+") a:last").click(function(){


var item=($("#sidebar div div:eq(0) fieldset").index($(this).parent().parent().parent()));

if($("#sidebar div div:eq(0) fieldset:eq("+eval(item)+") input:checked").val()==undefined)
{
//alert('Please select an option to proceed further');
$('#label-'+eval(item)).html("Please select an option");
$('#label-'+eval(item)).show();
return;
}
else {
$('#label-'+eval(item)).hide();
}

if(item==11)
{
document.getElementById("WMcaptcha").src="includes/captcha/CaptchaSecurityImages_WM4mins.php?width=80&height=30&characters=5&"+Math.random();
}




$("#sidebar div div:eq(0) fieldset").hide();
$("#sidebar div div:eq(0) fieldset:eq("+eval(item+1)+")").show();

})
}

if(k != 0) {
$("#sidebar div div:eq(0) fieldset .prev-next:eq("+k+") a:first").click(function(){
var item=($("#sidebar div div:eq(0) fieldset").index($(this).parent().parent().parent()));
$("#sidebar div div:eq(0) fieldset").hide();
$("#sidebar div div:eq(0) fieldset:eq("+eval(item-1)+")").show();
})
}

/*--------------------------------- end ----------------*/
}

$("#sidebar div div:eq(1) fieldset .prev-next:eq("+eval($("#sidebar div div:eq(0) fieldset").length-1)+") a:first").click(function(){
$("#sidebar div div:eq(0) fieldset:eq("+eval($("#sidebar div div:eq(0) fieldset").length-2)+")").show();
$("#sidebar div div:eq(0) fieldset:eq("+eval($("#sidebar div div:eq(0) fieldset").length-1)+")").hide();
});

/*--------------------------- end of first set of questions --------------------------*/


/*---------------------Second set of questions --------------------------*/



for(var i=0;i<($("#sidebar div:eq(2) fieldset").length);i++) {
/*--------------------------------- start ----------------*/

$("#sidebar  div:eq(2) fieldset .prev-next:eq("+eval(i)+") a:last").click(function(){ 
var item=($("#sidebar  div:eq(2) fieldset").index($(this).parent().parent().parent()));

/*----------------------------**/
	switch(item)
			{
			case  0: 	
			if(document.getElementById('msg').value=='')
				{
				$('#msg1').html('Please enter the industry');
				$('#msg1').show();
				document.getElementById('msg').focus()
				document.getElementById('msg').select()
			return false;
				}else
				{
				$('#msg1').hide();
				}
				
			 break;
			case 1:			
			
			if($("input:checked").val()==undefined)
			{
			$('#msg2').html('Please enter the industry');
		    $('#msg2').show();
			return;
			}
			else
			{
			$('#msg2').hide();
			}
		if(document.getElementById('cfa_1').checked==true)
				{
				if(document.getElementById('txtmsg').value=='')
				{
				$('#msg3').html('Please enter the Line of Business');
		        $('#msg3').show();
				document.getElementById('txtmsg').focus()
				document.getElementById('txtmsg').select()
			return false;
				}
				else
				{
				$('#msg3').hide();
				}
				}
				if(document.getElementById('cfa_2').checked==true)
				{
				if(document.getElementById('marketing').value=='')
				{
				$('#msg4').html('Please select the Marketing Lifecycle');
		        $('#msg4').show();
				document.getElementById('marketing').focus()
			return false;
				}
				else
				{
				$('#msg4').hide();
				}
				}
				if(document.getElementById('cfa_3').checked==true)
				{
			if(document.getElementById('func_area').value=='')
				{
				$('#msg5').html('Please select the Functional Area');
		        $('#msg5').show();
				document.getElementById('func_area').focus()
			return false;
				}
				else
				{
				$('#msg5').hide();
				}
				}
				if(document.getElementById('cfa_4').checked==true)
				{
					if(document.getElementById('channel').value=='')
					{
					    $('#msg6').html('Please select the Channel');
		                $('#msg6').show();
						document.getElementById('channel').focus()
						return false;
					}
					else if(document.getElementById('channel').value=='Other')
					{
						if(document.getElementById('chan_other').value=='') 
						{
						    $('#msg7').html('Please enter the Other channel');
		                    $('#msg7').show();
							document.getElementById('chan_other').focus()
							return false;
						}
						else
						{
						$('#msg7').hide();
						}
						$('#msg6').hide();
					}
				}
				if(document.getElementById('cfa_5').checked==true)
				{
				if(document.getElementById('cust_seg').value=='')
				{
				$('#msg8').html('Please enter the Customer Segment');
		        $('#msg8').show();
				document.getElementById('cust_seg').focus()
			return false;
				}
				else
				{
				$('#msg8').hide();
				}
				}			
			 break;

		case 2: 
			
			if(document.getElementById('challenge').value=='')
				{
				$('#msg9').html('Please enter the details');
		        $('#msg9').show();
				document.getElementById('challenge').focus()
			return false;
				}
				else
				{
				$('#msg9').hide();
				}
			break;
			 
			   
			case 3: 
			if(document.getElementById('measurement').value=='')
				{
				$('#msg10').html('Please enter the Measurement system');
		        $('#msg10').show();
				document.getElementById('measurement').focus()
			return false;
				}
				else
				{
				$('#msg10').hide();
				}
			     break;
 			 	
			}	

				
/*----------------------------*/

if(item==3)
{
document.getElementById("WMcaptcha7").src="includes/captcha/CaptchaSecurityImages_wrkasmnt.php?width=80&height=30&characters=5&"+Math.random();
}


$("#sidebar  div:eq(2) fieldset").hide();
$("#sidebar  div:eq(2) fieldset:eq("+eval(item+1)+")").show();
});

if(i != 0) {
$("#sidebar div:eq(2) fieldset .prev-next:eq("+i+") a:first").click(function(){
var item=($("#sidebar div:eq(2) fieldset").index($(this).parent().parent().parent()));

$("#sidebar div:eq(2) fieldset").hide();
$("#sidebar div:eq(2) fieldset:eq("+eval(item-1)+")").show();
})
}
/*--------------------------------- end ----------------*/
}

$("#sidebar div:eq(2) fieldset .prev-next:eq("+eval($("#sidebar div:eq(2) fieldset").length-1)+") a:first").click(function(){
$("#sidebar div:eq(2) fieldset:eq("+eval($("#sidebar div:eq(2) fieldset").length-2)+")").show();
$("#sidebar div:eq(2) fieldset:eq("+eval($("#sidebar div:eq(2) fieldset").length-1)+")").hide();
});

/*--------------------------- end of Second set of questions --------------------------*/



/*---------------------get touch tab1 set of questions --------------------------*/

$("#gettabs fieldset:eq(1) .prev-next").click(function(){
 if(document.schedulecall.timezone.selectedIndex==0) {
        $('#error3a').html('Please select your TimeZone');
       document.getElementById('error3a').style.display="block";
		document.schedulecall.timezone.focus()
		return false
	}  
	else
	{
	$('#error3a').hide();
	}
	if(trimSpace(document.schedulecall.call_date.value)=="") {
	    $('#error3b').html('Please select your Date');
        document.getElementById('error3b').style.display="block";
		document.schedulecall.call_date.focus()
		return false
	}  
	else
	{
	 $('#error3b').hide();
	}
$("#gettabs fieldset:eq(2)").show();
$("#gettabs fieldset:eq(1)").hide();

});

$("#gettabs fieldset  fieldset:eq(1) .prev-next a:first").click(function(){

$("#gettabs  fieldset  fieldset:eq(0)").show();
$("#gettabs  fieldset  fieldset:eq(1)").hide();

});


$("#gettabs fieldset  fieldset:eq(1) .prev-next a:last").click(function(){

if(document.schedulecall.hh.selectedIndex==0) {
            $('#error3c').html('Please select Hour');
            document.getElementById('error3c').style.display="block";
			document.schedulecall.hh.focus()
			return false
		}  
		else
		{
		$('#error3c').hide();
		}

		if(document.schedulecall.min.selectedIndex==0) {
		    $('#error3d').html('Please select minutes');
           document.getElementById('error3d').style.display="block";
			document.schedulecall.min.focus()
			return false
		}  
		else
		{
		$('#error3d').hide();
		}

if(document.schedulecall.min.selectedIndex==1 && document.schedulecall.hh.selectedIndex==1 )
		{
			$('#error3d').html('Please select your minute');
            document.getElementById('error3d').style.display="block";
			document.schedulecall.min.focus()
			return false
		}
		else
		{
		$('#error3d').hide();
		}



		if(document.schedulecall.call[0].checked==false && document.schedulecall.call[1].checked==false) {
		    
		    $('#error3e').html('Please select the type of call');
            document.getElementById('error3e').style.display="block";
			document.schedulecall.call[0].focus()
			return false
		}
		else
		{
		$('#error3e').hide();
		}


	

		if(document.schedulecall.exhh.selectedIndex==0) {
		
		    $('#error3f').html('Please select your Hour of Duration');
            document.getElementById('error3f').style.display="block";
			document.schedulecall.exhh.focus()
			return false
		}  
		else
		{
		$('#error3f').hide();
		}
		if(document.schedulecall.exmin.selectedIndex==0) {
		  $('#error3g').html('Please select your Minute of Duration');
             document.getElementById('error3g').style.display="block";
			document.schedulecall.exmin.focus()
			return false
		}
        else	
        {
		$('#error3g').hide();
         } 		
		
document.getElementById("WMcaptcha5").src="includes/captcha/CaptchaSecurityImages_web.php?width=80&height=30&characters=5&"+Math.random();

$("#gettabs  fieldset  fieldset:eq(2)").show();
$("#gettabs  fieldset  fieldset:eq(1)").hide();

});

$("#gettabs fieldset  fieldset:eq(2) .prev-next a:first").click(function(){
$("#gettabs  fieldset  fieldset:eq(1)").show();
$("#gettabs  fieldset  fieldset:eq(2)").hide();

});


/*--------------------------- end of get touch tab1 set of questions --------------------------*/


/*---------------------get touch tab3 set of questions --------------------------*/

$("#gettabs fieldset:eq(6) .prev-next").click(function(){
 if(!textValidate(document.schedulewebex.Name.value,''))
           {
	         $('#error3w').html('Please enter your Name <br/>(Alphabets only)');
			 $('#error3w').show();
			 document.schedulewebex.Name.focus();
	         document.schedulewebex.Name.select();
			 return false
		   }
		   else
		   {
		   $('#error3w').hide();
		   }
	if(!textValidate(document.schedulewebex.Nickname.value,''))
           {
	         $('#error3w1').html("Please enter your Nickname <br/>(Alphabets only)");
			 $('#error3w1').show();
			 document.schedulewebex.Nickname.focus();
	         document.schedulewebex.Nickname.select();
			 return false
			   }
			   else
			   {
			   $('#error3w1').hide();
			   }
$("#gettabs fieldset:eq(7)").show();
$("#gettabs fieldset:eq(6)").hide();

});

$("#gettabs fieldset:eq(7) .prev-next a:first").click(function(){

$("#gettabs  fieldset:eq(6)").show();
$("#gettabs  fieldset:eq(7)").hide();

});



$("#gettabs fieldset:eq(7) .prev-next a:last").click(function(){

 urlvalidAccess = 0;

if(!textValidate1(document.schedulewebex.Designation.value,''))
			   {
			      $('#error3w2').html("Please enter your Designation");
			     $('#error3w2').show();
				 document.schedulewebex.Designation.focus();
				 document.schedulewebex.Designation.select();
				 return false
			   }
			   else
			   {
			    $('#error3w2').hide();
			   }

if(document.schedulewebex.Organization.value!="")
		  {
		   if(!textValidate1(document.schedulewebex.Organization.value,''))
			   {
					$('#error3w3').html("Please enter your Organization")
					 $('#error3w3').show();
					document.schedulewebex.Organization.focus();
					document.schedulewebex.Organization.select();
					return false
			   } 
			   else
			   {
			    $('#error3w3').hide();
			   }
		   }

 if(!textValidate1(document.schedulewebex.Email.value,''))
           {
		        $('#error3w4').html("Please enter your Email ID");
			     $('#error3w4').show();
			 document.schedulewebex.Email.focus();
	         document.schedulewebex.Email.select();
			 return false
		   }
		   else
		   {
		   $('#error3w4').hide();
		   }

	if(document.schedulewebex.Email.value!="")
		  {
		   if(!emailexp.test(document.schedulewebex.Email.value,''))
			   {
					$('#error3w4').html('Please enter valid Email ID');
					$('#error3w4').show();
					document.schedulewebex.Email.focus();
					document.schedulewebex.Email.select();
					return false
			   }
		else 
			   {
			   if(urlvalidAccess!=1) {
					wscallurl('email_tab3b');
					var t4 = setTimeout("func_settime3b()",2000);
				}
				else {
				func_settime3b();
				}
			   }
			   
		   }
		   //document.getElementById("WMcaptcha6").src="includes/captcha/CaptchaSecurityImages_web.php?width=70&height=30&characters=5&"+Math.random();
});

$("#gettabs fieldset:eq(8) .prev-next a:first").click(function(){
$("#gettabs fieldset:eq(7)").show();
$("#gettabs fieldset:eq(8)").hide();

});


/*--------------------------- end of get touch tab3 set of questions --------------------------*/

$("#gettabs ul li:eq(0) a").click(function(){
gittab('Image11');
close_cal();
$('.txtUrlResults3a').html();
$('.txtUrlResults3a').css('display', 'none');
});
$("#gettabs ul li:eq(1) a").click(function(){

gittab('Image12');
close_cal();
$('.txtUrlResults3a').html();
$('.txtUrlResults3a').css('display', 'none');
});
$("#gettabs ul li:eq(2) a").click(function(){

gittab('Image13');
close_cal();
$('.txtUrlResults3a').html();
$('.txtUrlResults3a').css('display', 'none');
});
$("#gettabs ul li:eq(3) a").click(function(){

gittab('Image14');
close_cal();
$('.txtUrlResults3a').html();
$('.txtUrlResults3a').css('display', 'none');
});



var imgone=$('#sidebar h3 img').eq(0);
var imgtwo=$('#sidebar h3 img').eq(1);
var imgthree=$('#sidebar h3 img').eq(2);

var imgone1=$('#sidebar h3').eq(0);
var imgtwo2=$('#sidebar h3').eq(1);
var imgthree3=$('#sidebar h3').eq(2);



$("#sidebar h3").eq(0).click(function(){
imgone.attr('src','images/cv_max_assesment_over.gif');
imgtwo.attr('src','images/changeresponse_normal.gif');
imgthree.attr('src','images/gintouch-normal.gif');
imgone1.css('background-image','url("images/arrow-hide.gif")');
imgtwo2.css('background-image','url("images/arrow-show.gif")');
imgthree3.css('background-image','url("images/arrow-show.gif")');

$('.txtUrlResults3a').html();
$('.txtUrlResults3a').css('display', 'none');
});

$("#sidebar h3").eq(1).click(function(){
imgtwo.attr('src','images/changeresponse_over.gif');
imgone.attr('src','images/cv_max_assesment_normal.gif');
imgthree.attr('src','images/gintouch-normal.gif');
imgone1.css('background-image','url("images/arrow-show.gif")');
imgtwo2.css('background-image','url("images/arrow-hide.gif")');
imgthree3.css('background-image','url("images/arrow-show.gif")');
$('.txtUrlResults3a').html();
$('.txtUrlResults3a').css('display', 'none');
});

$("#sidebar h3").eq(2).click(function(){
imgthree.attr('src','images/gintouch-over.gif');
imgone.attr('src','images/cv_max_assesment_normal.gif');
imgtwo.attr('src','images/changeresponse_normal.gif');
imgone1.css('background-image','url("images/arrow-show.gif")');
imgtwo2.css('background-image','url("images/arrow-show.gif")');
imgthree3.css('background-image','url("images/arrow-hide.gif")');
$('.txtUrlResults3a').html();
$('.txtUrlResults3a').css('display', 'none');
});

});
   
function sc_up()
{
if($('#lyr1').attr("class") == "")
{
$(".scrollUP").attr("src","images/up.gif");
$('#lyr1').addClass("mum");
$(".scrollDOWN").attr("src","images/down.gif");
}else if($('#lyr1').attr("class")=="mum")
{
$('#lyr1').removeClass("mum");
$('#lyr1').addClass("lon");
$(".scrollDOWN").attr("src","images/down_grey.gif");
}

}

function sc_down()
{
if($('#lyr1').attr("class") == "mum")
{
$('#lyr1').removeClass("mum");
$(".scrollDOWN").attr("src","images/down.gif");
$(".scrollUP").attr("src","images/up_grey.gif");
} else if($('#lyr1').attr("class") == "lon")
{
$('#lyr1').removeClass("lon");
$('#lyr1').addClass("mum");
$(".scrollDOWN").attr("src","images/down.gif");
}
}
 
function func_settime1() {

if(urlvalidAccess==0)
{
	return false;
}
else 
{
     $('#error1b').hide();
	 if(document.frmmintest.frmins_security_code.value=="")
	  {
	         $('#error1c').html('Please enter the Security Code');
			     $('#error1c').show();
				document.frmmintest.frmins_security_code.focus();
			document.frmmintest.frmins_security_code.select();
			return false;
	   }
	   else
	   {
	   $('#error1c').hide();
	   }
}
return true;
}
 
function checkAll(frm) {
urlvalidAccess = 0;
	 if(!textValidate(frm.txtName.value,''))
			   {
				 $('#error1a').html('Please enter your Name <br/>(Alphabets only)');
			     $('#error1a').show();
				 frm.txtName.focus();
				 frm.txtName.select();
				 return false
			   }
			   else
			   {
			   $('#error1a').hide();
			   }
	if(!textValidate1(frm.txtEmail.value,''))
			   {
			      $('#error1b').html('Please enter your Email ID');
			     $('#error1b').show();
				 
				 frm.txtEmail.focus();
				 frm.txtEmail.select();
				 return false
			   }
			   else
			   {
			   $('#error1b').hide();
			   }
	if(frm.txtEmail.value!="")
		  {
		   if(!emailexp.test(frm.txtEmail.value,''))
			   {
					$('#error1b').html('Please enter valid Email ID');
					$('#error1b').show();
					frm.txtEmail.focus();
					frm.txtEmail.select();
					return false
			   }
			   else 
			   {
				   if(urlvalidAccess!=1) {
						wscallurl('email_tab1');
						var t1 = setTimeout("func_settime1()",2000);
				   }
				   else {
						func_settime1();
				   }
			   }
			   
		   }
}

function func_settime3b() {
if(urlvalidAccess==0)
{
	return false;
}
else {
$('#error3w4').hide();
document.getElementById("WMcaptcha6").src="includes/captcha/CaptchaSecurityImages_web.php?width=80&height=30&characters=5&"+Math.random();
$("#gettabs fieldset:eq(8)").show();
$("#gettabs fieldset:eq(7)").hide();

}
}

function frmmintestReset(frm)
{
	var r=confirm("Are you sure you want to reset the form?");
	if (r==true)
	{
		frm.reset();

		$("#sidebar div:eq(0)").show();
		$("#sidebar div:eq(0) fieldset").hide();
		$("#sidebar div:eq(0) fieldset:eq(0)").show();
		$('.validating').hide();
		urlvalidAccess=0;
		return false;
	}
	else
	{
		return false;
	}
}
function frmmintestReset1(frm)
{

	var r1=confirm("Are you sure you want to reset the form?");
	if (r1==true)
	{
		frm.reset();
		$("#gettabs fieldset:eq(3)").hide();
		$("#gettabs fieldset fieldset:eq(0)").show();
		urlvalidAccess=0;
		$('.validating').hide();
		return false;
	  
	}
	else
	{
		return false;
	}
}

function frmmintestReset2(frm)
{
	var r2=confirm("Are you sure you want to reset the form?");
	if (r2==true)
	{
		frm.reset();
		$("#gettabs  fieldset:eq(8)").hide();
		$("#gettabs fieldset:eq(6)").show();
		urlvalidAccess=0;
		$('.validating').hide();
		return false;
	}
	else
	{
		return false;
	}
}
function frmmintestReset3(frm)
{
	var r3=confirm("Are you sure you want to reset the form?");
	if (r3==true)
	{
		frm.reset();
		cfa_hide();
		$('#other_label').hide();
		$("#sidebar div:eq(2)").show();
		$("#sidebar div:eq(2) fieldset").hide();
		$("#sidebar div:eq(2) fieldset:eq(0)").show();
		urlvalidAccess=0;
		$('.validating').hide();
		return false;
	}
	else 
	{
		return false;
	}	
}
 

var xmlHttpRes;
var mailidcheck=0;
function wscallurl(email_val)
		{
			   xmlHttpRes=GetXmlHttpObject1();
				if (xmlHttpRes==null)
				 {
					 alert ("Browser does not support HTTP Request");
					 return;
				 }
				var url="ajax/security.php?emailval="+document.getElementById(email_val).value;
				xmlHttpRes.onreadystatechange=statewsurl
				xmlHttpRes.open("GET",url,true)
				xmlHttpRes.send(null)
		}
		
		function statewsurl()
			{
				  if(xmlHttpRes.readyState == 1)
					{
						$('.txtUrlResults3a').css('display', 'block');
						$('.txtUrlResults3a').html('');
						//document.getElementById('txtUrlResults3a').style.display="block";
						$('.txtUrlResults3a').html('<span class="validating">Validating ...</span>');
						
					} 
					
					if(xmlHttpRes.readyState == 4 || xmlHttpRes.readyState=="complete")
					{	
					$('.txtUrlResults3a').html('');
					$('.txtUrlResults3a').hide();	
						if(xmlHttpRes.responseText==1)
						{ 
						   urlvalidAccess = 1;
						}
						else 
						{ 
						    urlvalidAccess = 0;
						$('.txtUrlResults3a').css('display', 'block');
						$('.txtUrlResults3a').html('<span class="validating">Please enter valid <br /> corporate Email ID</span>');
						}					
					}
					
			}
			
			

function GetXmlHttpObject1()
{
	var xmlHttpRes=null;
	try
	 {
	 // Firefox, Opera 8.0+, Safari
	 xmlHttpRes=new XMLHttpRequest();
	 }
	catch (e)
	 {
	 //Internet Explorer
	 try
	  {
	  xmlHttpRes=new ActiveXObject("Msxml2.XMLHTTP");
	  }
	 catch (e)
	  {
	  xmlHttpRes=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	 }
	return xmlHttpRes;
}
function phone_validate(incomingString, defaultValue)
{
	if(trimSpace(incomingString).length == 0 || incomingString.search(/[^0-9\.\+\-]/g) != -1 || incomingString==defaultValue)
	{
		return false;
	}
	else
		return true;
}

function hide_call() {
document.getElementById('error3h').style.display="none";
document.getElementById('error3i').style.display="none";
document.getElementById('error3j').style.display="none";
document.getElementById('error3k').style.display="none";
 //$('#error3i').hide();
 //$('#error3j').hide();
 //$('#error3k').hide();
}


function hide_response() {
document.getElementById('msg3').style.display="none";
document.getElementById('msg4').style.display="none";
document.getElementById('msg5').style.display="none";
document.getElementById('msg6').style.display="none";
document.getElementById('msg7').style.display="none";
document.getElementById('msg8').style.display="none";
}

function func_settime3a() {
	if(urlvalidAccess==0)
	{
		return false;
	}
	else 
	{	
	$('#error3i').hide();
			if(trimSpace(document.schedulecall.txtPhone.value)=="")
			{
				$('#error3j').html('Please enter your Phone number');
				hide_call();
				document.getElementById('error3j').style.display="block";
				document.schedulecall.txtPhone.focus();
				document.schedulecall.txtPhone.select();
				return false
			}
			else
			{
			$('#error3j').hide();
			}
			

			if(!phone_validate(document.schedulecall.txtPhone.value,''))
			{
				$('#error3j').html('Please enter your correct number without any spaces');
				hide_call();
				document.getElementById('error3j').style.display="block";
				document.schedulecall.txtPhone.focus();
				document.schedulecall.txtPhone.select();
				return false
			}
			else 
			{
			$('#error3j').hide();
			}
			
			if(document.schedulecall.callsecurity_code.value=="")
			{
			    $('#error3k').html('Please enter the Security Code')
				hide_call();
				document.getElementById('error3k').style.display="block";
				document.schedulecall.callsecurity_code.focus();
				document.schedulecall.callsecurity_code.select();
				return false;
			}
			else
			{
			$('#error3k').hide();
			}
          
	}
					
     return true;

}
function checkAll1(frm) {
urlvalidAccess = 0;
	if(!textValidate(document.schedulecall.txtName1.value,''))
           {
	         $('#error3h').html('Please enter your Name <br/>(Alphabets only)');
			  hide_call();
			 document.getElementById('error3h').style.display="block";
			 document.schedulecall.txtName1.focus();
	         document.schedulecall.txtName1.select();
			 return false
		   }
		   else
		   {
		   $('#error3h').hide();
		   }
		   



if(!textValidate1(document.schedulecall.txtEmail1.value,''))
           {
	         $('#error3i').html('Please enter your <br/>Email ID');
			 hide_call();
			document.getElementById('error3i').style.display="block";
			 document.schedulecall.txtEmail1.focus();
	         document.schedulecall.txtEmail1.select();
			 return false
		   }
		   else
		   {
		   $('#error3i').hide();
		   }

	if(document.schedulecall.txtEmail1.value!="")
		  {
		   if(!emailexp.test(document.schedulecall.txtEmail1.value,''))
			{
					$('#error3i').html('Please enter valid <br/>Email ID');
					hide_call();
					document.getElementById('error3i').style.display="block";
					document.schedulecall.txtEmail1.focus();
					document.schedulecall.txtEmail1.select();
					return false;
			}
			else 
			{  
				if(urlvalidAccess!=1) {
					wscallurl('email_tab3a');
					var t=setTimeout("func_settime3a()",2000);
				}
				else {
				func_settime3a();
				}
			}		
					
		   }
	  
}



function completeCallback_call(response) 
{ 
	if(urlvalidAccess==1 && document.getElementById('callsecurity_code').value!="")
	{ 
		if(response=="success")
		{ 
			document.schedulecall.reset();
			$("#gettabs fieldset form:eq(0)").hide();
			$("#msg_frmin1").html("Thank you for scheduling a Call.");
			urlvalidAccess=0;
		}
		else 
		{
			$('#error3k').html(response);
			hide_call();
			$('.validating').hide();
			document.getElementById('error3k').style.display="block";
		}
	}

}



function completeCallback_web(response)
{
if(urlvalidAccess==1 )
{ 
	if(response=="success")
	{ 
		document.schedulewebex.reset();
		$("#gettabs fieldset form:eq(1)").hide();
		$("#msg_frmin2").html("Thank you for scheduling a Webx");
		$('.validating').hide();
		urlvalidAccess=0;
	}
	else 
	{
		$('#error3w8').html(response);
		$('.validating').hide();
		document.getElementById('error3w8').style.display="block";
	}
}
}




function checkAll2(frm) 
{

if(document.schedulewebex.timezone.selectedIndex==0)
          {
		       $('#error3w6').html('Please select your TimeZone');
			    $('#error3w6').show();
	           document.schedulewebex.timezone.focus()
	           return false
          }  
		  else
		  {
		   $('#error3w6').hide();
		  }
  if(trimSpace(document.schedulewebex.date_webex.value)=="")
	{
	            $('#error3w7').html('Please enter your Date');
			    $('#error3w7').show();
		document.schedulewebex.date_webex.focus();
		document.schedulewebex.date_webex.select();
		return false
	}
	else
	{
	$('#error3w7').hide();
	}
	if(document.schedulewebex.webxsecurity_code.value=="")
		  {
		        $('#error3w8').html('Please enter the Security Code');
			    $('#error3w8').show();
				document.schedulewebex.webxsecurity_code.focus();
				document.schedulewebex.webxsecurity_code.select();
				return false
		   }
		   else
		   {
		   $('#error3w8').hide();
		   }

return true;
}

function func_settime2(){
if(urlvalidAccess==0)
	{
		return false;
	}
	else 
	{
	$('#error2').hide();
  	if(document.getElementById('site_security_code').value=="")
			  {
			        $('#error3').html('Please enter the Security Code');
					$('#error3').show();
					document.getElementById('site_security_code').focus();
					document.getElementById('site_security_code').select();
					return false
			  }
			  else
			  {
			  $('#error3').hide();
			  }
	} 
	 return true;
}

function checkAll3(frm) { 

urlvalidAccess = 0;	
	if(!textValidate(document.siteaccess.txtName.value,''))
           { 
		     $('#error1').html('Please enter your name <br/>(Alphabets only)');
			 $('#error1').show();
			 document.siteaccess.txtName.focus();
	         document.siteaccess.txtName.select();
			 return false
		   }
		   else
		   {
		   $('#error1').hide();
		   }



if(!textValidate1(document.siteaccess.txtEmail.value,''))
           {
		     $('#error2').html('Please enter your Email ID');
			 $('#error2').show();
			 document.siteaccess.txtEmail.focus();
	         document.siteaccess.txtEmail.select();
			 return false
		   }
		   else
		   {
		   $('#error2').hide();
		   }

	if(document.siteaccess.txtEmail.value!="")
		  {
		   if(!emailexp.test(document.siteaccess.txtEmail.value,''))
			   {
					$('#error2').html("Please enter valid Email ID")
					$('#error2').show();
					document.siteaccess.txtEmail.focus();
					document.siteaccess.txtEmail.select();
					return false
			   }
			else {
				if(urlvalidAccess!=1) {
					wscallurl('email_tab2');
					var t2=setTimeout("func_settime2()",2000);
				}
				else {
				func_settime2();
				}	
				 
			}			
		   }
}


function cfa(val) {
$('#msg2').hide();
hide_response();

var cfa_split=val.split('_');
if(cfa_split[1] == 4 && $('#channel').val()=="Other") {
document.getElementById('other_label').style.display="block";
}
else {
document.getElementById('other_label').style.display="none";
}
cfa_hide();
document.getElementById('cfa_label'+cfa_split[1]).style.display="block";
}

function cfa_hide() {
for(var cf=1;cf<=5;cf++) {
document.getElementById('cfa_label'+cf).style.display="none";
}
}




/*-------------------------------Progress Bar ---------------------*/

var MW_MWJ_progBar = 0;
var progs=1;
var progrs;
var aprogs=1;
var aprogrs;

function MWgetRefToDivNest( divID, oDoc ) {
	if( !oDoc ) { oDoc = document; }
	if( document.layers ) {
		if( oDoc.layers[divID] ) { return oDoc.layers[divID]; } else {
			for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) {
				y = MWgetRefToDivNest(divID,oDoc.layers[x].document); }
			return y; } }
	if( document.getElementById ) { return document.getElementById(divID); }
	if( document.all ) { return document.all[divID]; }
	return document[divID];
}

function MWprogressBar( oBt, oBc, oBg, oBa, oWi, oHi, oDr ) {

	MW_MWJ_progBar++; this.id = 'MW_MWJ_progBar' + MW_MWJ_progBar; this.dir = oDr; this.width = oWi; this.height = oHi; this.amt = 0;
	//write the bar as a layer in an ilayer in two tables giving the border
	document.write( '<table border="0" cellspacing="0" cellpadding="'+oBt+'"><tr><td bgcolor="'+oBc+'">'+
		'<table border="0" cellspacing="0" cellpadding="0"><tr><td height="'+oHi+'" width="'+oWi+'" bgcolor="'+oBg+'">' );
	if( document.layers ) {
		document.write( '<ilayer height="'+oHi+'" width="'+oWi+'"><layer bgcolor="'+oBa+'" name="MW_MWJ_progBar'+MW_MWJ_progBar+'"></layer></ilayer>' );
	} else {
		document.write( '<div style="position:relative;top:0px;left:0px;height:'+oHi+'px;width:'+oWi+';">'+
			'<div style="position:absolute;top:0px;left:0px;height:0px;width:0;font-size:1px;background-color:'+oBa+';" id="MW_MWJ_progBar'+MW_MWJ_progBar+'"></div></div>' );
	}
	document.write( '</td></tr></table></td></tr></table>\n' );
	this.WMsetBar = WMresetBar; //doing this inline causes unexpected bugs in early NS4
	this.WMsetCol = WMsetColour;
	
}

function WMresetBar( a, b ) {
	//work out the required size and use various methods to enforce it
	this.amt = ( typeof( b ) == 'undefined' ) ? a : b ? ( this.amt + a ) : ( this.amt - a );
	if( isNaN( this.amt ) ) { this.amt = 0; } if( this.amt > 1 ) { this.amt = 1; } if( this.amt < 0 ) { this.amt = 0; }
	var theWidth = Math.round( this.width * ( ( this.dir % 2 ) ? this.amt : 1 ) );
	var theHeight = Math.round( this.height * ( ( this.dir % 2 ) ? 1 : this.amt ) );
	var theDiv = MWgetRefToDivNest( this.id ); if( !theDiv ) { window.status = 'Progress: ' + Math.round( 100 * this.amt ) + '%'; return; }
	if( theDiv.style ) { theDiv = theDiv.style; theDiv.clip = 'rect(0px '+theWidth+'px '+theHeight+'px 0px)'; }
	var oPix = document.childNodes ? 'px' : 0;
	theDiv.width = theWidth + oPix; theDiv.pixelWidth = theWidth; theDiv.height = theHeight + oPix; theDiv.pixelHeight = theHeight;
	if( theDiv.resizeTo ) { theDiv.resizeTo( theWidth, theHeight ); }
	theDiv.left = ( ( this.dir != 3 ) ? 0 : this.width - theWidth ) + oPix; theDiv.top = ( ( this.dir != 4 ) ? 0 : this.height - theHeight ) + oPix;
}


function WMsetColour( a ) {
	//change all the different colour styles
	var theDiv = MWgetRefToDivNest( this.id ); if( theDiv.style ) { theDiv = theDiv.style; }
	theDiv.bgColor = a; theDiv.backgroundColor = a; theDiv.background = a;
}


/*------------------------------- End of Progress Bar ---------------------*/

