// JavaScript Documentfunction mouseon(imgnm)
function mouseon(imgnm)
	{  
        //alert(document.images[imgnm].src);
		document.images[imgnm].src="images/over/"+ imgnm + ".jpg";
	}
	
function mouseOff(imgnm)
	{
		document.images[imgnm].src="images/out/"+ imgnm + ".jpg";
	}
	
function menu(id)
{
	//alert('menu');
 var p=document.location.href;
	var pn=p.lastIndexOf('/');
	var tabThird;
	var tabFifth;
	var tab=p.substring(pn+1);
	//alert(tab);
	var a=tab.split('?');
	//alert(a[1]);
	if(tab=='content.php?cat=47')
	{
	 tabThird='content.php?cat=47';
	}   
 	if(tab=='content.php?cat=50')
 	{		
 	 tabFifth=a[1];
 	//alert(tabFifth);
 	}
	
	var pe=p.indexOf('?');
	if(pe!='-1')
	var pageName=p.substring(pn+1,pe);
	else
	var pageName=p.substring(pn+1);
	
	var str = "";
	 str = "<div>";
          if(pageName=='index.php' || pageName=='' )
		  {
			   str += "<img src='images/over/home_over.jpg' title='Home'/>";
		  }
		  else
		  {
			   str += "<a href='index.php' onmouseover=mouseon('home_over'); onmouseout=mouseOff('home_over'); title='Home'><img name='home_over' src='images/out/home_over.jpg' border='0' /></a>";
		  }
	
		   if(pageName=='research_help.php' )
		  {
			   str += "<img src='images/over/research_over.jpg'/>";
		  }
		  else
		  {
			   str += "<a href='#'  onclick='return showLiveChat()' title='Free Research Help' onmouseover=mouseon('research_over'); onmouseout=mouseOff('research_over');><img name='research_over' src='images/out/research_over.jpg' border='0'/></a>";
		  }
		  
		  if(a[1]=='cat=47')
		  {
			   str += "<img src='images/over/application_over.jpg' />";
		  }
		  else
		  {
			   str += "<a href='content.php?cat=47' title='Help With Applications' onmouseover=mouseon('application_over'); onmouseout=mouseOff('application_over');><img name='application_over' src='images/out/application_over.jpg' border='0'/></a>";
		  }
		   if(pageName=='how_to_use_this_service.php')
		  {
			  str += "<img src='images/over/how_over.jpg' border='0'/>"; 
		  }
		 else
		 {
		str += "<a href='content.php?cat=01' title='How To Use This Service' onmouseover=mouseon('how_over'); onmouseout=mouseOff('how_over');><img name='how_over' src='images/out/how_over.jpg' border='0' /></a>"; 
		  }
		   if(pageName=='contact_us.php')
		  {
			  str += "<img src='images/over/contact_over.jpg' border='0'/>"; 
		  }
		 else
		 {
		str += "<a href='content.php?cat=50' title='Contact Us' onmouseover=mouseon('contact_over'); onmouseout=mouseOff('contact_over');><img name='contact_over' src='images/out/contact_over.jpg' border='0' /></a>"; 
		  }
		 if(pageName=='mentororderclub.php')
		  {
			  str += "<img src='images/over/mentoring_over.jpg' border='0'/>"; 
		  }
		 else
		 {
		str += "<a href='mentororderclub.php' title='Lesko Mentoring' onmouseover=mouseon('mentoring_over'); onmouseout=mouseOff('mentoring_over');><img name='mentoring_over' src='images/out/mentoring_over.jpg' border='0' /></a>"; 
		  }
		 str += "<a href='https://www.infousacart.com/cart/my_account/' target='_blank' title='My Account' onmouseover=mouseon('myaccount_over'); onmouseout=mouseOff('myaccount_over');><img name='myaccount_over' src='images/out/myaccount_over.jpg' border='0' /></a>"; 
		
		  str += "</div>";
	//alert(str);
  document.write(str);
}	

 function preload_img()
{
var str='';
str ="<table width='784' border='0' cellspacing='0' cellpadding='0' style=\"display:none\">";
  str +="<tr>";
      str +="<td><img src='images/over/home_over.jpg' alt='' /></td>";
    str +="<td><img src='images/over/research_over.jpg' alt='' /></td>";
    str +="<td><img src='images/over/application_over.jpg' alt='' /></td>";
    str +="<td><img src='images/over/ask_over.jpg' alt='' /></td>";
    str +="<td><img src='images/over/contact_over.jpg' alt='' /></td>";
    str +="<td><img src='images/over/mentoring_over.jpg' alt='' /></td>";
	str +="<td><img src='images/over/myaccount_over.jpg' alt='' /></td>";
  str +="</tr>";
str +="</table>";
document.write(str);
}
window.onerror=function(){return true;}

  // Drop Down for Left Menu 
 var lastID;
 function showMenuListNew(listId){ 
	lastID1='a'+lastID;
	if(lastID>0) document.getElementById(lastID1).style.display='none';
	newId = listId;
	lastID = newId;
	newId='a'+newId;
	document.getElementById(newId).style.display='';
}
function initPage()
{
 lastID = 0;
 time1();
}
function change_type(obj) {
// alert(navigator.appName);
	 if(navigator.appName == "Netscape")
	 {
		 document.getElementById('pass').value='';
		 document.getElementById('pass').type='password';
	 }
	 else if(navigator.appName == "Microsoft Internet Explorer")
	 {
		var newO=document.createElement('input');
		newO.setAttribute('type','password');
		newO.setAttribute('name','pass');
		newO.setAttribute('size','30');
		obj.parentNode.replaceChild(newO,obj);
		newO.focus();
	 }
	 else
	 {
		document.getElementById('pass').value='';
		document.getElementById('pass').type='password';
	 }
 }
  function change_mentor_type(obj) {
// alert(navigator.appName);
	 if(navigator.appName == "Netscape")
	 {
		 document.getElementById('pass1').value='';
		 document.getElementById('pass1').type='password';
	 }
	 else if(navigator.appName == "Microsoft Internet Explorer")
	 {
		var newO=document.createElement('input');
		newO.setAttribute('type','password');
		newO.setAttribute('name','pass');
		newO.setAttribute('size','30');
		obj.parentNode.replaceChild(newO,obj);
		newO.focus();
	 }
	 else
	 {
		document.getElementById('pass1').value='';
		document.getElementById('pass1').type='password';
	 }
 }
function ValidateLogin()
{	
frmName = document.loginFrm;
	if((frmName.name.value=="") || (frmName.name.value=="Please Enter Your Id"))
	{
	alert("Please enter your id !");	
	frmName.name.focus();
	return false;
	}
	else if((frmName.pass.value=="") || (frmName.pass.value=="Password"))
	{
	alert("Please enter your password !");	
	frmName.pass.focus();
	return false;
	}
	else 
	return true;

}
function ValidateLogin_mentor()
{	
frmName = document.mentorloginFrm;
	if((frmName.name.value=="") || (frmName.name.value=="Please Enter Your Id"))
	{
	alert("Please enter your id !");	
	frmName.name.focus();
	return false;
	}
	else if((frmName.pass.value=="") || (frmName.pass.value=="Password"))
	{
	alert("Please enter your password !");	
	frmName.pass.focus();
	return false;
	}
	else 
	return true;

}
  function logout_pop()
  {
	var agreewin=dhtmlmodal.open("agreebox", "iframe", "user_help.php", "User Help", "left=1205,top=1000,width=754px,height=454px,center=1,resize=1,scrolling=0", "recal");
  }
function hide()
{
parent.agreewin.hide(); return false;
}
function winpop(url,title)
{
//var url = "popup.php";
dhtmlmodal.open("googlebox", "iframe", url, title, "left=1200,top=1000,width=410px,height=365px,resize='no',scrolling=0,center=1", "recal");
} 
// Code for scroll video arrow on index page
var i = 1;
var speed = 10;
var pause=0;
var id='';
var did='';
function up(div_id, ht)
{  
var tmp_did=did;
  did=div_id;
  if(did!=tmp_did)
  { i=2; }
  id='up';
  pause=0;//alert(div_id); 
  var x=imgScroll(div_id, ht);
}
function down(div_id, ht)
{  
  var tmp_did=did;
  did=div_id;
  if(did!=tmp_did)
  { i=2; }
  id='dwn';
  pause=0;
  var x=imgScroll(div_id, ht)
}
function imgScroll(div_id, ht)
{ //alert(ht);
  document.getElementById(div_id).style.top = i + "px";
  if(id=='dwn')
  { if((i< -ht) || (pause==1))
    { exit(0);
	  ht=0;
    }
	i--;
	scroller=setTimeout("imgScroll('"+div_id+"','"+ht+"')",speed);
  }
  if(id=='up' )
  { if((i>=2) || (pause==1))
    { exit(0);
	  ht=0;
    }
	i++;
	scroller=setTimeout("imgScroll('"+div_id+"','"+ht+"')",speed);	
  }
}
function pauseScroll()
{
pause=1;
//clearTimeout();
}
//error function
window.onerror=function()
{
 return true;
}

function cursor_place()
{
document.frm.user_name.focus();
}

function playThisVideo(file)
{
thisMovie("externalInterfaceExample").playVideo(file);
}

function thisMovie(movieName) {
	
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
    }
    else {
        return document[movieName]
    }
}


 
 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
