function fnChange(Element)
{
	var Home = document.getElementById('MenuHome');
	var About = document.getElementById('MenuAbout');
	var Products = document.getElementById('MenuProducts');
	var Benefits = document.getElementById('MenuBenefits');
	var Support = document.getElementById('MenuSupport');
	var Partners = document.getElementById('MenuPartners');
	var Contact = document.getElementById('MenuContact');
	var Press = document.getElementById('MenuPress');
	
	if(Element == 'MenuHome')
	{
		Home.className = 'MenuOn';
		About.className = 'MenuOff';
		Products.className = 'MenuOff';
		Benefits.className = 'MenuOff';
		Support.className = 'MenuOff';
		Partners.className = 'MenuOff';
		Contact.className = 'MenuOff';
		Press.className = 'MenuOff';
	}
	else if(Element == 'MenuAbout')
	{
		Home.className = 'MenuOff';
		About.className = 'MenuOn';
		Products.className = 'MenuOff';
		Benefits.className = 'MenuOff';
		Support.className = 'MenuOff';
		Partners.className = 'MenuOff';
		Contact.className = 'MenuOff';
		Press.className = 'MenuOff';
	}
		else if(Element == 'MenuProducts')
	{
		Home.className = 'MenuOff';
		About.className = 'MenuOff';
		Products.className = 'MenuOn';
		Benefits.className = 'MenuOff';
		Support.className = 'MenuOff';
		Partners.className = 'MenuOff';
		Contact.className = 'MenuOff';
		Press.className = 'MenuOff';
	}
		else if(Element == 'MenuBenefits')
	{
		Home.className = 'MenuOff';
		About.className = 'MenuOff';
		Products.className = 'MenuOff';
		Benefits.className = 'MenuOn';
		Support.className = 'MenuOff';
		Partners.className = 'MenuOff';
		Contact.className = 'MenuOff';
		Press.className = 'MenuOff';
	}
		else if(Element == 'MenuSupport')
	{
		Home.className = 'MenuOff';
		About.className = 'MenuOff';
		Products.className = 'MenuOff';
		Benefits.className = 'MenuOff';
		Support.className = 'MenuOn';
		Partners.className = 'MenuOff';
		Contact.className = 'MenuOff';
		Press.className = 'MenuOff';
	}
		else if(Element == 'MenuPartners')
	{
		Home.className = 'MenuOff';
		About.className = 'MenuOff';
		Products.className = 'MenuOff';
		Benefits.className = 'MenuOff';
		Support.className = 'MenuOff';
		Partners.className = 'MenuOn';
		Contact.className = 'MenuOff';
		Press.className = 'MenuOff';
	}
		else if(Element == 'MenuContact')
		{
			Home.className = 'MenuOff';
			About.className = 'MenuOff';
			Products.className = 'MenuOff';
			Benefits.className = 'MenuOff';
			Support.className = 'MenuOff';
			Partners.className = 'MenuOff';
			Contact.className = 'MenuOn';
			Press.className = 'MenuOff';
		}
		else if(Element == 'MenuPress')
		{
			Home.className = 'MenuOff';
			About.className = 'MenuOff';
			Products.className = 'MenuOff';
			Benefits.className = 'MenuOff';
			Support.className = 'MenuOff';
			Partners.className = 'MenuOff';
			Contact.className = 'MenuOff';
			Press.className = 'MenuOn';
		}
		
}
function sencase(objsen)
{
	txt=objsen.value+" ";
	txt=txt.toLowerCase();
	txtl="";
	punc=",.?!:;)'";
	punc+='"';
 	while ((txt.length>0)&&(txt.indexOf(" ")>-1)){
		pos=txt.indexOf(" ");
		wrd=txt.substring(0,pos);
		wrdpre="";
		if (punc.indexOf(wrd.substring(0,1))>-1){
			wrdpre=wrd.substring(0,1);
			wrd=wrd.substring(1,wrd.length);
		}
		cmp=" "+wrd+" ";
		for (var i=0;i<9;i++){
			p=wrd.indexOf(punc.substring(i,i+1));
			if (p==wrd.length-1){
				cmp=" "+wrd.substring(0,wrd.length-1)+" ";
				i=9;
   			}
		}
		if (cmp.indexOf(cmp)<0){
			ltr=wrd.substring(0,1);
			ltr=ltr.toUpperCase();
			wrd=ltr+wrd.substring(1,wrd.length);
		}
		txtl+=wrdpre+wrd+" ";
		txt=txt.substring((pos+1),txt.length);
	}
	ltr=txtl.substring(0,1);
	ltr=ltr.toUpperCase();
	txtl=ltr+txtl.substring(1,txtl.length-1);
	objsen.value=txtl;
}
/*For adding - in the phone numbers */
var ZipLen = 10;
var mandatoryLen = 12;
var SSNmandatoryLen = 11;
var allowableChars  = new Array([4,45],[8,45],[13,120],[13,88]);
                function isNum(event,dotreq) {
                    var keyCod = (navigator.appName.indexOf("Microsoft")!=-1 )? event.keyCode:event.which ;
                    var valid = "0123456789";
                    obj = (navigator.appName.indexOf("Microsoft")!=-1 ) ? window.event.srcElement:event ? event.target : null  ;
                    if ( dotreq && obj.value.indexOf(".") == -1  ) valid = valid + '.' ;
                    var temp = String.fromCharCode(keyCod);
                    if (valid.indexOf(temp) == "-1" && keyCod!=0 && keyCod!=8)    {
                       keyCod = 0 ;
                       return false ;
                    }
                    return true;
                }
                function isValidChar(Elemnt,event)
                {

                	for(var i=0;i<allowableChars.length;i++){

					   if((Elemnt.value.length+1 == allowableChars[i][0]) && (event.keyCode == allowableChars[i][1]))
					   {
					   	 return true;
					   }
                	}
                	return false;
                }
                function formatPhoneAndFax(event,elementId,forSsn) {
						var Country;
						Country = document.getElementById('ddlCountry');
						
						if(Country.value == "USA" || Country.value == "Canada")
						{
							var secondDelimter = 7;
							if(forSsn)
								secondDelimter = 6;
							Elemnt = document.getElementById(elementId);
							if(isNum(event)) {
								if(Elemnt.value.length > 0 && (Elemnt.value.length== 3 || Elemnt.value.length== secondDelimter))
									Elemnt.value = Elemnt.value + "-";
								else if(Elemnt.value.length == (secondDelimter+5))
								Elemnt.value = Elemnt.value + "x";
							}
							else  {
								if (!isValidChar(Elemnt,event))
                            		return false;
                            		//Not an Number
							}
							return true;
						}
						else
						{
							var key;
							key = event.keyCode;
							
							if(key < 48 || key > 57)
							{
								event.returnValue = false;
							}
							else
							{
								event.returnValue = true;
							}							
						}                        
                    } //End of formatPhone
                    
                    function formatPhoneAndFaxWithoutExtn(event,elementId,forSsn) {
						var Country;
						Country = document.getElementById('ddlCountry');
						
						if(Country.value == "USA" || Country.value == "Canada")
						{
							var secondDelimter = 7;
							if(forSsn)
								secondDelimter = 6;
							Elemnt = document.getElementById(elementId);
							if(isNum(event)) {
								if(Elemnt.value.length > 0 && (Elemnt.value.length== 3 || Elemnt.value.length== secondDelimter))
									Elemnt.value = Elemnt.value + "-";
								else if(Elemnt.value.length == (secondDelimter+5))
									Elemnt.value = Elemnt.value;  + "x";
							}
							else  {
								if (!isValidChar(Elemnt,event))
                            		return false;
                            		//Not an Number
							}
							return true;
						}
						else
						{
							var key;
							key = event.keyCode;
							
							if(key < 48 || key > 57)
							{
								event.returnValue = false;
							}
							else
							{
								event.returnValue = true;
							}							
						}                        
                    } //End of formatPhone
                    
                    function isValidPhoneAndFax(elementId,maxLength,msg,forSsn) {
						var Country;
						Country = document.getElementById('ddlCountry');
						
						if(Country.value == "USA" || Country.value == "Canada")
						{						
							var secondDelimter = 7;
							if(forSsn)
								secondDelimter = 6;
							Elemnt = document.getElementById(elementId);
							if(Elemnt.value.length ==0 )
								return true;
							if((Elemnt.value.length < mandatoryLen) || (Elemnt.value.length > maxLength) ) {
									alert(msg);
									Elemnt.value = '';
									setTimeout(function(){Elemnt.focus()}, 10);
							}
							else
							if(Elemnt.value.length == mandatoryLen+1){// checking for Extension, which is optional
                        		Elemnt.value = Elemnt.value.substring(0,Elemnt.value.length-1)
							}
							else if(Elemnt.value.length>0  && ( Elemnt.value.lastIndexOf('-') != secondDelimter || Elemnt.value.indexOf('-') != 3)) {
								alert(msg);
								Elemnt.value = '';
								setTimeout(function(){Elemnt.focus()}, 10);
							}
						}
						else
						{
							return true;
						}
                    } //End of validLength
					   function formatSSN(event,elementId,forSsn) {
						var secondDelimter = 7;
						if(forSsn)
							secondDelimter = 6;
						if(isNum(event)) {
							Elemnt = document.getElementById(elementId);
							if(Elemnt.value.length > 0 && (Elemnt.value.length== 3 || Elemnt.value.length== secondDelimter))
								Elemnt.value = Elemnt.value + "-";
						}
						else  {
							return false; //Not an Number
						}
						return true;
					} //End of formatPhone
					
					  function isValidSSN(elementId,maxLength,msg,forSsn) {

							var secondDelimter = 7;
							if(forSsn)
								secondDelimter = 6;
							Elemnt = document.getElementById(elementId);
							if(Elemnt.value.length == 0 )
							return true;
							if((Elemnt.value.length < SSNmandatoryLen) || (Elemnt.value.length > maxLength) ) {
									alert(msg);
									Elemnt.value = '';
									setTimeout(function(){Elemnt.focus()}, 10);
							}
						}
			// validation for  Zip code
				 function formatZipCode(event,elementId,e) 
				 {
					// e.keyCode - IE; e.which - Firefox
					var k = window.event ? event.keyCode : e.which;
					
					// functions like 'refresh', 'backspace', 'delete' etc.
					if (k < 32) return true;
					
					var Country;
						
					Country = document.getElementById('ddlCountry');
					
					if(Country.value == "USA" || Country.value == "Canada")
					{
						//if(isNum(event)) 
						if (k < 48 || k > 57) 
						{
							return false;
						}
						else
						{
							Elemnt = document.getElementById(elementId);
							if(Elemnt.value.length == 5)
								Elemnt.value = Elemnt.value + "-";
						}
					}
					
					return true;
				} //End of formatZipCode
					
					
				 function isValidZipCode(elementId,maxLength,msg) 
				 {
						var Country;
						
						Country = document.getElementById('ddlCountry');
						
						if(Country.value == "USA" || Country.value == "Canada")
						{
							Elemnt = document.getElementById(elementId);
							
							if(Elemnt.value.length == 0)
								return true;
							
							if (Elemnt.value.length == 5)
								Elemnt.value = Elemnt.value + '-0000';
								
							if((Elemnt.value.length < ZipLen) || (Elemnt.value.length > maxLength) ) 
							{
									alert(msg);
									Elemnt.value = '';
									setTimeout(function(){Elemnt.focus()}, 10);
							}
						}
						else
						{
							return true;
						}
                    } 
					
					
						
					function fnOnLineValidate(){
							Elemnt = document.getElementById('ddlHear');
							TxtBox = document.getElementById('txtOthers');
							txtFName = document.getElementById('txtFName');
							txtLName = document.getElementById('txtLName');
							txtCompany = document.getElementById('txtCompany');
							txtJobTitle = document.getElementById('txtJobTitle');
							txtEmail = document.getElementById('txtEmail');
							txtComments = document.getElementById('txtComments');
										
							
							if (!validRequired(txtFName,"First Name"))
							return false;
							
								else if (!validRequired(txtLName,"Last Name"))
								return false;

								else if (!validRequired(txtCompany,"Company"))
								return false;
						
								else  if (!validRequired(txtJobTitle,"Job Title"))
								return false;
								
								else if (!validEmail(txtEmail,"EMail ID", "yes"))
								return false;
								
								else  if (!validRequired(ddlHear,"How do you hear about TalentSecure LLC?"))
								return false;
																				
								else if( Elemnt.options[Elemnt.selectedIndex].text == 'Others' )
										{
											if( TxtBox.value == "" || TxtBox.value.length < 0 )
											{
												alert("Please enter a value for Others");
												return false;
											}
										}
								else if (!validRequired(txtComments,"Comments"))
								return false;
							
								else
								{
									document.frmContact.submit();
									return false;
								}
						}
				function fnValidate(){
					var fname = document.getElementById('txtFName');
					var lname = document.getElementById('txtLName');
					var email = document.getElementById('txtEmail');
					var country = document.getElementById('ddlCountry');
					var phone = document.getElementById('txtPhone');
					var url = document.getElementById('txtURL');
							if (!validRequired(fname,"First Name"))
							return false;
								else if (!validRequired(lname,"Last Name"))
								return false;
								else if (!validEmail(email,"EMail ID", "yes"))
								return false;
								else if (!validSelection(country,"Country"))
								return false;
								else if (!validRequired(phone,"Phone"))
								return false;
						else
						{
							//document.contact.submit();
							return true;
						}
				}
			function fnNewsType()
			{
				var WebsiteTBL = document.getElementById('tblNewsWebsite');
				var MemeberTR = document.getElementById('trEvents');
				var ddlType = document.getElementById('ddlNewsType');
				if (ddlType.value == "Events Website")
				{
					WebsiteTBL.style.display = 'inline';
					MemeberTR.style.display = 'none';
				}
				else
					{
					WebsiteTBL.style.display = 'none';
					MemeberTR.style.display = 'inline';
				}
			}
			function clickIt(value)
			{
				if (value != null &&  typeof(gfPop) != 'undefined'  &&  typeof(gfPop.fPopCalendar) != 'undefined')
				{
					gfPop.fPopCalendar(value);
				}
					return false;
			}
		function referrer()
			{
				var HiddenText = document.getElementById('hdIntelli').value ;
				if(document.referrer.indexOf("Partners.aspx")>-1)
							fun_select('Partner');
					else if(HiddenText == 'More') 
							fun_select('More');
					else
							fun_select('GenInfo');
							
			}
			var buttonType;
			function fun_select(buttonType)
			{
				var General = document.getElementById('tbl_radio');
				var Partner = document.getElementById('tbl_partner');
				var Intelli = document.getElementById('tbl_intelli');

				if(buttonType=="GenInfo"){
			
					General.style.display = 'inline';
					Partner.style.display = 'none';
					Intelli.style.display = 'none';
				}
				else if (buttonType=="Partner"){
				
					General.style.display = 'none';
					Partner.style.display = 'inline';
					Intelli.style.display = 'none';
				}
				else if (buttonType=="More"){
					General.style.display = 'none';
					Partner.style.display = 'none';
					Intelli.style.display = 'inline';
			
				}
			}
		function fnOthers()
		{
			var Option = document.getElementById('ddlHear');	
			var Elment = document.getElementById('spnOthers');
			var ElmentText = document.getElementById('spnOthersText');
			
			if (Option.value == "Others")
			{
				 Elment.style.display = 'inline';
				 ElmentText.style.display = 'inline';
			}
			else 
			{
				Elment.style.display = 'none';
				ElmentText.style.display = 'none';
			}
		}
		function newwindow(w,h,webaddress) 
		{	
			
			var viewimageWin = window.open(webaddress,'New_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=Yes,resizable=no,copyhistory=no,width='+w+',height='+h);
			viewimageWin.moveTo(screen.availWidth/2-(w/2),screen.availHeight/2-(h/2));
			viewimageWin.focus();
		}
		function fnFocus(element)
		{
			var txtBox = document.getElementById(element);
			txtBox.focus();
	}
		function fnCancel(){
		var Action =confirm("('All Unsaved data will be lost! \n Do you wish to cancel this form?')");
		if (Action == true)
			location.href="ShowVirtualDemolist.aspx";
		else
			return false
	}
	


var scrollspeed		= "1"		// SET SCROLLER SPEED 1 = SLOWEST
var speedjump		= "20"		// ADJUST SCROLL JUMPING = RANGE 20 TO 40
var startdelay 		= "1" 		// START SCROLLING DELAY IN SECONDS
var nextdelay		= "1" 		// SECOND SCROLL DELAY IN SECONDS 0 = QUICKEST
var topspace		= "2px"		// TOP SPACING FIRST TIME SCROLLING
var frameheight		= "2px"	// IF YOU RESIZE THE WINDOW EDIT THIS HEIGHT TO MATCH



current = (scrollspeed)


function HeightData(){
AreaHeight=dataobj.offsetHeight
if (AreaHeight==0){
setTimeout("HeightData()",( startdelay * 1000 ))
}
else {
ScrollNewsDiv()
}}

function NewsScrollStart(){
dataobj=document.all? document.all.NewsDiv : document.getElementById("NewsDiv")
dataobj.style.top=topspace
setTimeout("HeightData()",( startdelay * 1000 ))
}

function ScrollNewsDiv(){
dataobj.style.top=parseInt(dataobj.style.top)-(scrollspeed)
if (parseInt(dataobj.style.top)<AreaHeight*(-1)) {
dataobj.style.top=frameheight
setTimeout("ScrollNewsDiv()",( nextdelay * 1000 ))
}
else {
setTimeout("ScrollNewsDiv()",speedjump)
}}

	
	
