window.name = "lsl_admin";
function tellafriend(url)
{
	window.open(url+'edfedtellafriend.php','popuptellafriend','height=552,width=410,toolbar=no,menubar=no,scrollbars=no,top=50,left=100,resizable=no');
}


// Zlayer function and no credit variable.
var nocredit='<table cellpadding="0" cellspacing="0" width="400" border="0"><tr>'
		+ '<td width="400" class="textsize3g" align="center"><font style="font-family: georgia, verdana, arial; font-size:18px; color:#FFFFFF;"><b>'
		+ 'WE WILL NOT RUN YOUR CREDIT.</b></font></td></tr>'
		+ '<tr><td height="15"></td></tr><tr><td class="textsize2g"><font style="font-family: georgia, verdana, arial; font-size:15px; color:#FFFFFF;">'
		+ 'We have the ability to immediately access your '
		+ 'federal student loan balances in the government student loan database to '
		+ 'see if you qualify for a Federal Consolidation Loan. Because we are '
		+ 'accessing a federal borrower database and not your credit report, no '
		+ 'inquiry will appear on your credit report, and we will not see anything '
		+ 'other than information pertaining to your federal loans.<br><br></font></td>'
		+ '</tr> </table>';	

		function show_zlayer(text,MID_X,MID_Y)
		{
			MIDX_VALUE = MID_X;
			MIDY_VALUE = MID_Y;
			overlib(text,
					 STICKY, CAPTION,' ', CAPTIONPADDING,4, TEXTPADDING,8,
					 CGCLASS,'olcg', FGCLASS,'olfg', CAPTIONFONTCLASS,'olcap', TEXTFONTCLASS,'oltxt',
					 CLOSETEXT,myClose, CLOSECLICK, CENTER, ABOVE, MIDX,MIDX_VALUE, MIDY,MIDY_VALUE, WRAP, BASE,3, SCROLL,
					 DRAGGABLE, SHADOW, SHADOWX,-1, SHADOWY,-1, FILTER, HIDEBYIDALL,'flashDiv',
					 STATUS,'STICKY popup with link and secondary popup and FILTER for IE v5.5+');
		}
		var myClose = '<img src="images/closewin.gif" alt="Click to Close" '
 +' hspace="2" vspace="2" border="0">';



/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
/*
//Contents for menu 1
var menu1=new Array()
//var fullpath='http://kuriakose/kuriakosek/edfed.com/www/'
var fullpath='http://test.edfed.com/'

menu1[0]='<a href="'+fullpath+'#">The Rewards of a Higher Education</a>'
menu1[1]='<a href="'+fullpath+'#">What Colleges Look for</a>'
menu1[2]='<a href="'+fullpath+'#">College Tuition Guide</a>'
menu1[3]='<a href="'+fullpath+'#">Planning Calendar</a>'
menu1[4]='<a href="'+fullpath+'#">The Financial Aid Process</a>'
menu1[5]='<a href="'+fullpath+'#">Scholarship Search</a>'
menu1[6]='<a href="'+fullpath+'#">Useful Links</a>'

//Contents for menu 2
var menu2=new Array()
menu2[0]='<a href="'+fullpath+'#">Stafford Loans</a>'
menu2[1]='<a href="'+fullpath+'#">PLUS Loans</a>'
menu2[2]='<a href="'+fullpath+'#">Private Loans</a>'
menu2[3]='<a href="'+fullpath+'#">Repayment</a>'
menu2[4]='<a href="'+fullpath+'#">Loan Comparison Chart</a>'
menu2[5]='<a href="'+fullpath+'#">FAQ</a>'

//Contents for menu 3, and so on
var menu3=new Array()
menu3[0]='<a href="'+fullpath+'#">Federal Loan Consolidation</a>'
menu3[1]='<a href="'+fullpath+'#">Federal Loan Reconsolidation</a>'
menu3[2]='<a href="'+fullpath+'#">Private Loan Consolidation</a>'
menu3[3]='<a href="'+fullpath+'#">In-School Loan Consolidation</a>'
menu3[4]='<a href="'+fullpath+'#">Consolidation Savings Charts</a>'
menu3[5]='<a href="'+fullpath+'#">FAQ</a>'

//Contents for menu 4, and so on
var menu4=new Array()
menu4[0]='<a href="'+fullpath+'articles/index.php">Articles</a>'
menu4[1]='<a href="'+fullpath+'#">Calculators</a>'
menu4[2]='<a href="'+fullpath+'edfedentrance_exit.php">Entrance & Exit Counseling</a>'
menu4[3]='<a href="'+fullpath+'#">Forms</a>'
menu4[4]='<a href="'+fullpath+'edfedglossary_terms.php">Glossary of Terms</a>'
		
var menuwidth='165px' //default menu width
var menubgcolor='lightyellow'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
*/
function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}
// Commented by KK, to fix admin Java script error on every page, 3/7/2006
//if (hidemenu_onclick=="yes")
//document.onclick=hidemenu


//Link Rollover starts here
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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 MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//link rollover ends here
function ValidatorTrim(s)
{
    var m = s.match(/^\s*(\S+(\s+\S+)*)\s*$/);
    return (m == null) ? "" : m[1];
}

function checkEmail(strng)
{
	var error = "";
	if (strng == "")
		{
		error = "You did not enter an email-address.\n";
		}
	var emailFilter=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
	if (!(emailFilter.test(strng))) 
		{ 
		error = "Please enter a valid email address.\n";
		}
	var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/;
	if(strng.match(illegalChars))
		{
		error = "The email address contains illegal characters.\n";
		}
	return error;
}
function checkEmailX(strng,fieldcaption)
{
	var error = "";
	if (strng == "")
		{
		error = "You did not enter an "+fieldcaption+".\n";
		}
	var emailFilter=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
	if (!(emailFilter.test(strng))) 
		{ 
		error = "Please enter a valid "+fieldcaption+".\n";
		}
	var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/;
	if(strng.match(illegalChars))
		{
		error = "The "+fieldcaption+" contains illegal characters.\n";
		}
	return error;
}
function checkspecialchar(alphane)
{
	var str = alphane;
	for(var j=0; j<str.length; j++)
	{
		var alphaa = str.charAt(j);
		var chrcode = alphaa.charCodeAt(0);
		if((chrcode > 47 && chrcode<59) || (chrcode > 64 && chrcode<91) || (chrcode > 96 && chrcode<123) || chrcode==95)
		{
		}
		else
		{
			return false;
		}
	}
	return true;
}

function checkspecialchar2(alphane)
{
	var str = alphane;
	for(var j=0; j<str.length; j++)
	{
		var alphaa = str.charAt(j);
		var chrcode = alphaa.charCodeAt(0);
		if((chrcode > 47 && chrcode<59) || (chrcode > 64 && chrcode<91) || (chrcode > 96 && chrcode<123) || chrcode==95 || chrcode==45 || chrcode==46 || chrcode==32)
		{
		}
		else
		{
			return false;
		}
	}
	return true;
}

function Validate(FieldValue, FieldName)
{
	var strFieldValue = FieldValue;
	var strFieldName = FieldName;
	var strCurrentChar;
	// This variable will determine if our string is valid
	var blnValidFieldValue = true;     
   // Step through the FieldValue one character at a time...
	for (var iLoop=0; iLoop < strFieldValue.length; iLoop++)
	{
	   // Check to see if the current character is valid
			strCurrentChar = strFieldValue.substring(iLoop,iLoop+1);

			if(
			// if A-Z...
		(strCurrentChar >= 'A' && strCurrentChar <= 'Z')
		// or if a-z...
		|| (strCurrentChar >= 'a' && strCurrentChar <= 'z')
		// or if 0-9...
		|| (strCurrentChar >= '0' && strCurrentChar <= '9')
		// or if dash or underscore
		|| strCurrentChar == '-' || strCurrentChar == '_' || strCurrentChar == ' '
		);
		// We have a valid string... do nothing.     
			else
			 // We have an invalid string, set the flag
			  blnValidFieldValue = false;
	}     
	// If we have an invalid FieldValue, alert the user
	return blnValidFieldValue;
}
function checkalphanumeric(alphane)
{
	var str = alphane;
	for(var j=0; j<str.length; j++)
	{
		var alphaa = str.charAt(j);
		var chrcode = alphaa.charCodeAt(0);
		if((chrcode > 47 && chrcode<59) || (chrcode > 64 && chrcode<91) || (chrcode > 96 && chrcode<123) || chrcode==95)
		{
		}
		else
		{
			return false;
		}
	}
	return true;
}
function checkNumeric(strng,errmsgfield) {
	var error = "";
	var illegalChars = /\D/;
	if (illegalChars.test(strng)) {
	   	error = errmsgfield+" is invalid.\n";
	}
	return error;
}

function hasNumber(alphane)
{
	var str = alphane;
	for(var j=0; j<str.length; j++)
	{
		var alphaa = str.charAt(j);
		var chrcode = alphaa.charCodeAt(0);
		if((chrcode > 47 && chrcode < 58))
		{
			return true;
		}		
	}
	return false;
}
function IsNumber(sText)
{
   var ValidChars = "0123456789";
   var IsNumber=true;
   var Char;

 
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   
}

function checkspecialchar(alphane)
{
	var str = alphane;
	for(var j=0; j<str.length; j++)

	{
		var alphaa = str.charAt(j);
		var chrcode = alphaa.charCodeAt(0);
		if((chrcode > 47 && chrcode<59) || (chrcode > 64 && chrcode<91) || (chrcode > 96 && chrcode<123) || chrcode==95)
		{
		}
		else
		{
			return false;
		}
	}
	return true;
}
function MoveOption(objSourceElement, objTargetElement,flag)   
{
	var aryTempSourceOptions = new Array();        
	var x = 0;               
 	//looping through source element to find selected options       
	for (var i = 0; i < objSourceElement.length; i++) {           
		if (objSourceElement.options[i].selected)
		{   
			//if(flag != "D")
			//{    
				var bln=true;
				for (var j = 0; j < objTargetElement.length; j++)
				{
					 if(objTargetElement.options[j].value == objSourceElement.options[i].value)
					 {
					 	bln=false;
					 }	
				}
				if(bln)
				{	        
					//need to move this option to target element               
					var intTargetLen = objTargetElement.length++;                
					objTargetElement.options[intTargetLen].text = objSourceElement.options[i].text;                
					objTargetElement.options[intTargetLen].value = objSourceElement.options[i].value;
				}	           
			//}
			//objSourceElement.options[i].selected=false;	
	 	}  
		          
		else {
			//if(flag=="D")
			//{              
				//storing options that stay to recreate select element                
				var objTempValues = new Object();               
				objTempValues.text = objSourceElement.options[i].text;                
				objTempValues.value = objSourceElement.options[i].value;                
				aryTempSourceOptions[x] = objTempValues;                
				x++;           
			//}	
		}
 	}  
	
	//if(flag=="D")
	//{               
		//resetting length of source        
		objSourceElement.length = aryTempSourceOptions.length;        
		//looping through temp array to recreate source select element        
		for (var i = 0; i < aryTempSourceOptions.length; i++)
		 {            
			objSourceElement.options[i].text = aryTempSourceOptions[i].text;            
			objSourceElement.options[i].value = aryTempSourceOptions[i].value;            
			objSourceElement.options[i].selected = false;        
		}
	//}
	var listobj;
	if(flag=="D")
	{
		listobj=objSourceElement
	}
	else
		listobj=objTargetElement
		
	var idstring,textstring;
	idstring="";
	textstring="";
	for (var j = 0; j < listobj.length; j++)
	{
		if(listobj.options[j].value != -1)
		{
			if(j!=listobj.length-1)
			{
				idstring=idstring+listobj.options[j].value+",";
				textstring=textstring+listobj.options[j].text+",<br>";
			}
			else
			{
				idstring=idstring+listobj.options[j].value;
				textstring=textstring+listobj.options[j].text;
			}
		}			
	}	
}
function popup_ipod(url)
{
	window.open(url+"popup_ipod.php",'ipod','height=600,width=748,toolbar=no,menubar=no,scrollbars=yes,top=50,left=100,resizable=no');
	openpopupflag=false;
}
function popup_prius(url)
{	
	window.open(url+"popup_prius.php",'prius','height=598,width=748,toolbar=no,menubar=no,scrollbars=yes,top=50,left=100,resizable=no');
	openpopupflag=false;
}
function popup_london(url)
{
	window.open(url+"popup_london.php",'london','height=598,width=748,toolbar=no,menubar=no,scrollbars=yes,top=50,left=100,resizable=no');
	openpopupflag=false;
}
function popup_rules(url)
{
	window.open(url+"popup_rules.php",'rules','height=525,width=748,toolbar=no,menubar=no,scrollbars=yes,top=110,left=175,resizable=no');
}
function popup_ipod1(url)
{
	window.open(url+"popup_ipod1.php",'ipod','height=560,width=748,toolbar=no,menubar=no,scrollbars=yes,top=50,left=100,resizable=no');
	openpopupflag=false;
}
function loop_time() 
{
	document.getElementById("dvLastRequestTime").innerHTML = '123';	
	setInterval('get_current_time()',100)
}
function get_current_time()
{
   var d_title='Last Request Time :';
   var one_sec=1000;   
   current_time=new Date();
   current_time.getTime();
   var login_time=Math.floor((current_time-login_ms)/one_sec);   
   document.getElementById("dvLastRequestTime").innerHTML = d_title+' '+login_time+' '+'sec';
   
   if  (login_time>60)
   {
		var m=Math.floor(login_time/60);
		var s=login_time%60;		
		document.getElementById("dvLastRequestTime").innerHTML = d_title+' '+m+' '+'min '+s+' '+'sec';
   }
}

// flash banner
function virtualgirl()
{
   document.write('<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" HEIGHT="370" WIDTH="225" ID="Flash1">');
   document.write('<PARAM NAME="Movie" VALUE="https://www.juriscape.com/images/edfed/swf/mvsp8.swf">');
   document.write('<PARAM NAME="Quality" VALUE="High">');
   document.write('<PARAM NAME="Loop" VALUE="0">');
   document.write('<param name="wmode" value="transparent">');
   document.write('<PARAM NAME="Play" VALUE="1">');
   document.write('<PARAM NAME="Scale" VALUE="ShowAll">');
   document.write('<PARAM NAME="Menu" VALUE="False">');
   document.write('<PARAM NAME="SAlign" VALUE="L">');
   document.write('<PARAM NAME="KeyColor" VALUE="FFFFFF">');
   document.write('<EMBED ID="Flash1" SRC="https://www.juriscape.com/images/edfed/swf/mvsp8.swf" HEIGHT=370 WIDTH=225 PALETTE=BACKGROUND Quality=High Loop=FALSE Play=TRUE Scale=ShowAll SAlign=L ALT="" PLUGINSPAGE="https://www.macromedia.com/go/getflashplayer/" TYPE="application/x-shockwave-flash"></OBJECT>');
}
function audio()
{
   document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="70" height="35" id="jur flash" align="middle">');
   document.write('<param name="allowScriptAccess" value="sameDomain">');
   document.write('<param name="movie" value="https://www.edfed.com/images/audio.swf">');
   document.write('<param name="quality" value="high">');
   document.write('<embed src="https://www.edfed.com/images/audio.swf" quality="high" width="70" height="35" name="jur flash" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer">');
   document.write('</OBJECT>');
}

function mailtocolleague(title,id,url)
{
	
	var strurl = url+'mslemailtocolleague.php';
	if(typeof(title)!="undefined")
		strurl = strurl + "?title="+escape(title);
  	if(typeof(url)!="undefined")
		strurl = strurl + "&articleid=" + escape(id);
	window.open(strurl,'mailtocollegue','height=440,width=450,scrollbars=no,toolbar=no,menubar=no,top=100,left=100');
}

function NewWindow(mypage, myname, w, h, scroll) 
{
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
function guaranteed(path)
{
  document.write('<object data="'+path+'images/banner/guaranteed_190x100.swf" type="application/x-shockwave-flash" width="190" height="100"><param name="MOVIE" value="'+path+'images/banner/guaranteed_190x100.swf"><param name="wmode" value="transparent"></object>');
}
function guaranteedbenefits(){
	var path="http://www.medicalschoolloans.com/";
	window.open(path+'mslguarantedbenefits.php','','height=610,width=615,toolbar=no,menubar=no,scrollbars=no,top=40,left=80,resizable=no');
}
function topbanner(path)
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="1003" height="100"><param name="movie" value="'+path+'images/banner/banner_msl_1003x100.swf"><param name="quality" value="high"><embed src="'+path+'images/banner/banner_msl_1003x100.swf" quality="high" width="1003" height="100" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer"></embed></object>');
}