// JavaScript Document

////////var set for defining button on current page
var currentPage;
var divToGet;
/////var for defining current for all buttons including login
var current=null;
//////var set for determing when login is display, cannot change pointer of currentPage inorder to define the proper button when login is closed
var loginSelect=false;
var F2=parent.frames[2];
var infoButtonAry=new Array();

function mouseOver(el)
{
	if(current==el)return;
	el.src=el.src.substring(0,el.src.lastIndexOf('.'))+'Over'+el.src.substring(el.src.lastIndexOf('.'));

	if(el.id=='clinics0'  || el.id=='register1' || el.id=='loginButton2' || el.id=='certificates3' || el.id=='profile4')
	{
		if(!F2.document.getElementById('infoButDiv'))return;
		var butLoc=getElementPosition(el);
		divToGet=F2.document.getElementById('infoButDiv');
		var numId=parseInt(el.id.charAt(el.id.length-1),10);
		F2.document.getElementById('infoDivTD').innerHTML=infoButtonAry[numId];
		
		divToGet.style.left=butLoc.left;
		divToGet.style.top=butLoc.top+40;
		divToGet.style.visibility='visible';
		growDiv();

	}
}
function growDiv()
{
	
	var divWnum=parseInt(divToGet.style.width,10);
	var divHnum=parseInt(divToGet.style.height,10);
	divToGet.style.width=divWnum+20;
	if(divHnum<70)divToGet.style.height=divHnum+4;
	
	if(divWnum<420)setTimeout('growDiv();',10);
	
}

function mouseOut(el)
{

	if(current==el)return;
	el.src=el.src.substring(0,el.src.lastIndexOf('.')-4)+el.src.substring(el.src.lastIndexOf('.'));
	if(el.id=='clinics0'  || el.id=='register1' || el.id=='loginButton2' || el.id=='certificates3' || el.id=='profile4')
	{
		if(!F2.document.getElementById('infoButDiv'))return;
		//var divToGet=el.src.substring(el.src.lastIndexOf('/')+1,el.src.lastIndexOf('.'))+'OverDiv';
		divToGet.style.visibility='hidden';
		F2.document.getElementById('infoDivTD').innerHTML="";
		divToGet.style.width='0px';
		divToGet.style.height='0px';
		
	}
}
function topTableStandard()
{

if(!O202)
{

F2.document.write('<TABLE WIDTH=778 BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0>');
F2.document.write('<TR>');
F2.document.write('<TD><IMG SRC="images/spacer.gif" WIDTH=61 HEIGHT=1></TD>');
F2.document.write('<TD><IMG SRC="images/spacer.gif" WIDTH=93 HEIGHT=1></TD>');
F2.document.write('<TD><IMG SRC="images/spacer.gif" WIDTH=83 HEIGHT=1></TD>');
F2.document.write('<TD><IMG SRC="images/spacer.gif" WIDTH=12 HEIGHT=1></TD>');
F2.document.write('<TD><IMG SRC="images/spacer.gif" WIDTH=102 HEIGHT=1></TD>');
F2.document.write('<TD><IMG SRC="images/spacer.gif" WIDTH=6 HEIGHT=1></TD>');
F2.document.write('<TD><IMG SRC="images/spacer.gif" WIDTH=39 HEIGHT=1></TD>');
F2.document.write('<TD><IMG SRC="images/spacer.gif" WIDTH=60 HEIGHT=1></TD>');
F2.document.write('<TD><IMG SRC="images/spacer.gif" WIDTH=190 HEIGHT=1></TD>');
F2.document.write('<TD><IMG SRC="images/spacer.gif" WIDTH=132 HEIGHT=1></TD>');
F2.document.write('<TR>');
F2.document.write('<TR>'); 
F2.document.write('<TD COLSPAN=2 ROWSPAN=2><IMG SRC="images/LuvMyPet.gif" WIDTH=154 HEIGHT=36></TD>');
F2.document.write('<TD COLSPAN=7> <img src="images/bgBlueTop.gif" width=492 height=15></TD>');
F2.document.write('<TD id="loginFields" ROWSPAN=3><IMG onMouseOver="parent.frames[1].mouseOver(this);" onMouseOut="parent.frames[1].mouseOut(this);" class="hand" SRC="images/logo.gif" WIDTH=132 HEIGHT=76></TD>');
F2.document.write('</TR>');
F2.document.write('<TR>');
F2.document.write('<TD COLSPAN=2><IMG id="aboutUs" onClick="document.location=\'aboutUs.htm\';" onMouseOver="parent.frames[1].mouseOver(this);" onMouseOut="parent.frames[1].mouseOut(this);" class="hand"  SRC="images/aboutUs.gif" WIDTH=95 HEIGHT=21></TD>');
F2.document.write('<TD><IMG  id="contactUs" onClick="document.location=\'contactUs.htm\';" onMouseOver="parent.frames[1].mouseOver(this);" onMouseOut="parent.frames[1].mouseOut(this);" class="hand" SRC="images/contactUs.gif" WIDTH=102 HEIGHT=21></TD>');
F2.document.write('<TD COLSPAN=2><IMG  id="faq" onClick="document.location=\'faq.htm\';" onMouseOver="parent.frames[1].mouseOver(this);" onMouseOut="parent.frames[1].mouseOut(this);" class="hand" SRC="images/faq.gif" WIDTH=45 HEIGHT=21></TD>');
F2.document.write('<TD COLSPAN=2><IMG SRC="images/bgBlue.gif" WIDTH=250 HEIGHT=21></TD>');
F2.document.write('</TR>');
F2.document.write('<TR>');		
F2.document.write('<TD><IMG id="homeButton" onClick="document.location=\'lmp.htm\';" onMouseOver="parent.frames[1].mouseOver(this);" onMouseOut="parent.frames[1].mouseOut(this);" class="hand" SRC="images/home.gif" WIDTH=61 HEIGHT=40></TD>');		
F2.document.write('<TD COLSPAN=2><IMG id="clinics0" onClick="document.location=\'vacLocations.htm\';" onMouseOver="parent.frames[1].mouseOver(this);" onMouseOut="parent.frames[1].mouseOut(this);" class="hand" SRC="images/clinicLocations.gif" WIDTH=176 HEIGHT=40></TD>');		
F2.document.write('<TD COLSPAN=3><IMG id="register1"  onClick="document.location=\'register.htm\';" onMouseOver="parent.frames[1].mouseOver(this);" onMouseOut="parent.frames[1].mouseOut(this);" class="hand" SRC="images/register.gif" WIDTH=120 HEIGHT=40></TD>');		
F2.document.write('<TD COLSPAN=2><IMG id="loginButton2"  onClick="parent.frames[1].loginDisplay(this);" onMouseOver="parent.frames[1].mouseOver(this);" onMouseOut="parent.frames[1].mouseOut(this);" class="hand" SRC="images/login.gif" WIDTH=99 HEIGHT=40></TD>');	
F2.document.write('<TD id="loginOptions"><a id="marker"><IMG SRC="images/standardPaws.gif" WIDTH=190 HEIGHT=40></a></TD>');	
F2.document.write('</TR>');
F2.document.write('<TR>');
F2.document.write('<TD COLSPAN=10><IMG SRC="images/menuLine.gif" WIDTH=778 HEIGHT=2></TD>');		
F2.document.write('</TR>');
F2.document.write('</TABLE>');
F2.document.write('<div id="infoButDiv" style="position:absolute; overflow:hidden; visibility:hidden; z-index:99; border:none; width:0px; height:0px; left: 100px; top: 300px;"> ');
F2.document.write('<TABLE  class="pageDesc" bordercolor="#1D7A6C" width="400" bgColor="#1D7A6C">');
F2.document.write('<TR>');
F2.document.write('<TD id="infoDivTD" bgColor="#FFFFFF"></TD>');		
F2.document.write('</TR>');
F2.document.write('</TABLE>');
F2.document.write('</DIV>');
F2.document.write('<div id="remIdButDiv" style="position:absolute; overflow:hidden; visibility:hidden; z-index:99; border:none; width:425px; height:50px; left: 100px; top: 300px;"> ');
F2.document.write('<TABLE  class="remIDDesc" bordercolor="#1D7A6C" width="418" bgColor="#1D7A6C">');
F2.document.write('<TR>');
F2.document.write('<TD align="right" id="remIdDivTD" bgColor="#1D7A6C"></TD>');		
F2.document.write('</TR>');
F2.document.write('</TABLE>');
F2.document.write('</DIV>');

}
else
{
F2.document.write('<TABLE WIDTH=778 BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0>');
F2.document.write('<TR>');
F2.document.write('<TD><IMG SRC="images/spacer.gif" WIDTH=61 HEIGHT=1></TD>');
F2.document.write('<TD><IMG SRC="images/spacer.gif" WIDTH=93 HEIGHT=1></TD>');
F2.document.write('<TD><IMG SRC="images/spacer.gif" WIDTH=83 HEIGHT=1></TD>');
F2.document.write('<TD><IMG SRC="images/spacer.gif" WIDTH=12 HEIGHT=1></TD>');
F2.document.write('<TD><IMG SRC="images/spacer.gif" WIDTH=102 HEIGHT=1></TD>');
F2.document.write('<TD><IMG SRC="images/spacer.gif" WIDTH=32 HEIGHT=1></TD>');
F2.document.write('<TD><IMG SRC="images/spacer.gif" WIDTH=13 HEIGHT=1></TD>');
F2.document.write('<TD><IMG SRC="images/spacer.gif" WIDTH=74 HEIGHT=1></TD>');
F2.document.write('<TD><IMG SRC="images/spacer.gif" WIDTH=88 HEIGHT=1></TD>');
F2.document.write('<TD><IMG SRC="images/spacer.gif" WIDTH=88 HEIGHT=1></TD>');
F2.document.write('<TD><IMG SRC="images/spacer.gif" WIDTH=132 HEIGHT=1></TD>');
F2.document.write('<TR>');
F2.document.write('<TR>'); 
F2.document.write('<TD COLSPAN=2 ROWSPAN=2><IMG SRC="images/LuvMyPet.gif" WIDTH=154 HEIGHT=36></TD>');
F2.document.write('<TD COLSPAN=8><IMG SRC="images/bgBlueTop.gif" WIDTH=492 HEIGHT=15></TD>');
F2.document.write('<TD id="loginFields" ROWSPAN=3><IMG onMouseOver="parent.frames[1].mouseOver(this);" onMouseOut="parent.frames[1].mouseOut(this);" class="hand" SRC="images/logo.gif" WIDTH=132 HEIGHT=76></TD>');
F2.document.write('</TR>');
F2.document.write('<TR>');
F2.document.write('<TD COLSPAN=2><IMG id="aboutUs" onClick="document.location=\'aboutUs.htm\';" onMouseOver="parent.frames[1].mouseOver(this);" onMouseOut="parent.frames[1].mouseOut(this);" class="hand"  SRC="images/aboutUs.gif" WIDTH=95 HEIGHT=21></TD>');
F2.document.write('<TD><IMG id="contactUs" onClick="document.location=\'contactUs.htm\';" onMouseOver="parent.frames[1].mouseOver(this);" onMouseOut="parent.frames[1].mouseOut(this);" class="hand" SRC="images/contactUs.gif" WIDTH=102 HEIGHT=21></TD>');
F2.document.write('<TD COLSPAN=2><IMG id="faq" onClick="document.location=\'faq.htm\';" onMouseOver="parent.frames[1].mouseOver(this);" onMouseOut="parent.frames[1].mouseOut(this);" class="hand" SRC="images/faq.gif" WIDTH=45 HEIGHT=21></TD>');
F2.document.write('<TD COLSPAN=3><IMG SRC="images/bgBlue.gif" WIDTH=250 HEIGHT=21></TD>');
F2.document.write('</TR>');
F2.document.write('<TR>');		
F2.document.write('<TD><IMG  id="homeButton" onClick="document.location=\'lmp.htm\';" onMouseOver="parent.frames[1].mouseOver(this);" onMouseOut="parent.frames[1].mouseOut(this);" class="hand" SRC="images/home.gif" WIDTH=61 HEIGHT=40></TD>');		
F2.document.write('<TD COLSPAN=2><IMG id="clinics0" onClick="document.location=\'vacLocations.htm\';" onMouseOver="parent.frames[1].mouseOver(this);" onMouseOut="parent.frames[1].mouseOut(this);" class="hand" SRC="images/clinicLocations.gif" WIDTH=176 HEIGHT=40></TD>');		
F2.document.write('<TD COLSPAN=3><IMG id="certificates3" onClick="document.location=\'manageCertsPetOwner.htm\';" onMouseOver="parent.frames[1].mouseOver(this);" onMouseOut="parent.frames[1].mouseOut(this);" class="hand" SRC="images/certificates.gif" WIDTH=146 HEIGHT=40></TD>');		
F2.document.write('<TD COLSPAN=2><IMG id="profile4" onClick="document.location=\'profilePetOwner.htm\';" onMouseOver="parent.frames[1].mouseOver(this);" onMouseOut="parent.frames[1].mouseOut(this);" class="hand" SRC="images/profile.gif" WIDTH=87 HEIGHT=40></TD>');
F2.document.write('<TD><IMG onClick="parent.frames[1].logOut();" onMouseOver="parent.frames[1].mouseOver(this);" onMouseOut="parent.frames[1].mouseOut(this);" class="hand" SRC="images/logOut.gif" WIDTH=88 HEIGHT=40></TD>');
F2.document.write('<TD id="loginOptions"><a id="marker"><IMG SRC="images/loginPaws.gif" WIDTH=88 HEIGHT=40></a></TD>');	
F2.document.write('</TR>');
F2.document.write('<TR>');
F2.document.write('<TD COLSPAN=11><IMG SRC="images/menuLine.gif" WIDTH=778 HEIGHT=2></TD>');		
F2.document.write('</TR>');
F2.document.write('</TABLE>');
F2.document.write('<div id="infoButDiv" style="position:absolute; visibility:hidden;  width:0px; height:0; z-index:99; border:none; left: 100px; top: 300px;"> ');
F2.document.write('<TABLE  class="pageDesc" bordercolor="#1D7A6C" width="400" bgColor="#1D7A6C">');
F2.document.write('<TR>');
F2.document.write('<TD id="infoDivTD" bgColor="#FFFFFF"></TD>');		
F2.document.write('</TR>');
F2.document.write('</TABLE>');
F2.document.write('</DIV>');
F2.document.write('<div id="remIdButDiv" style="position:absolute; overflow:hidden; visibility:hidden; z-index:99; border:none; width:425px; height:50px; left: 100px; top: 300px;"> ');
F2.document.write('<TABLE  class="remIDDesc" bordercolor="#1D7A6C" width="418" bgColor="#1D7A6C">');
F2.document.write('<TR>');
F2.document.write('<TD align="right" id="remIdDivTD" bgColor="#1D7A6C"></TD>');		
F2.document.write('</TR>');
F2.document.write('</TABLE>');
F2.document.write('</DIV>');


}
}
function welcomeIdentify()
{
	if(!O202)return;
	else
	{
		
		var Fname=O202.FName.charAt(0).toUpperCase()+O202.FName.substring(1,O202.FName.length);
		var Lname=O202.LName.charAt(0)+O202.LName.substring(1,O202.LName.length).toLowerCase();
		var userId=O202.OrigUid.substring(0,O202.OrigUid.length).toUpperCase();
		var convertedName='<a class="welcome">Welcome, '+Fname+' '+Lname+' (<font size="2px">'+userId+'</font>)</a>';
		F2.document.getElementById('userNameDisplay').innerHTML=convertedName;
	}
	
}
function loginDisplay(el)
{
	

		if(current==el)return;
		loginSelect=true;
		el.src="images/loginOnOn.gif";
		if(current)current.src=current.src.substring(0,current.src.lastIndexOf('.')-4)+current.src.substring(current.src.lastIndexOf('.'));
		if(F2.document.getElementById('infoButDiv'))F2.document.getElementById('infoButDiv').style.visibility='hidden';
		current=el;

var logOptTD=F2.document.getElementById('loginOptions');
logOptTD.innerHTML='<table width="100%" height="40" border="0" cellpadding="0" cellspacing="0" bgcolor="#1D7A6C"><tr><td align="center" width="26%"                                      class="whiteSmallStrong"><u> <a id="marker" class="hand" onClick="parent.frames[1].closeLogin();"> Close</a></u></td><td width="40%" align="center" valign="middle" class="whiteSmallStrong"><u><a class="hand" onClick="javascript:parent.frames[1].lostPass();">Forgot Password</a></u></td><td width="34%" valign="middle"><input type="submit" class="loginSubmit" onClick="parent.frames[1].userLogin();" name="Submit" value="Submit"></td></tr></table>';




var logFldTD=F2.document.getElementById('loginFields');
logFldTD.innerHTML='<table width="100%" height="76" border="0" cellpadding="0" cellspacing="0" bgcolor="#1D7A6C"><tr><td align="center" class="whiteSmallStrong">User Id</td></tr><tr><td align="center"><input id="sUserId" size="10"></td></tr><tr><td align="center" class="whiteSmallStrong">Password</td></tr><tr><td align="center"><input id="sSis" type="password" size="10"></td></tr></table>';

	displayRemId(F2.document.getElementById('loginOptions'));
	
	if(getCookie('_remId'))
	{
		var remId=getCookie('_remId');
		F2.document.getElementById('sUserId').value=remId.substring(0,remId.indexOf(','));
		F2.document.getElementById('sSis').value=remId.substring(remId.lastIndexOf(',')+1,remId.length);
		F2.document.getElementById('remId').checked=true;
	}
	
}



function closeLogin()
{

var loginOptionsTD=F2.document.getElementById('loginOptions');
	loginOptionsTD.innerHTML='<a id="marker"><IMG SRC="images/standardPaws.gif" WIDTH=190 HEIGHT=40></a>';

var loginFieldsTD=F2.document.getElementById('loginFields');
	loginFieldsTD.innerHTML='<IMG onMouseOver="parent.frames[1].mouseOver(this);" onMouseOut="parent.frames[1].mouseOut(this);" class="hand" SRC="images/logo.gif" WIDTH=132 HEIGHT=76>';
	
	//////////////////////////////////////////////////////////////
	/////////////CHANGE THE IMAGE TO .GIF ONCE PROJECT APPROVED////
	F2.document.getElementById('loginButton2').src="images/login.gif";
	////////////////////////////////////////////////////////////////
	loginSelect=false;
	currentPage.src=currentPage.src.substring(0,currentPage.src.lastIndexOf('.'))+'Over'+currentPage.src.substring(currentPage.src.lastIndexOf('.'))
	current=currentPage;
	
	if(!F2.document.getElementById('remIdButDiv'))return;
	var divIdToGet=F2.document.getElementById('remIdButDiv');
	divIdToGet.style.visibility='hidden';
	F2.document.getElementById('remIdDivTD').innerHTML="";

}

function displayRemId(el)
{
		
		//if(!F2.document.getElementById('remIdButDiv'))return;
		var butLoc=getElementPosition(el);
		var divIdToGet=F2.document.getElementById('remIdButDiv');
		F2.document.getElementById('remIdDivTD').innerHTML=infoButtonAry[5];
		
		divIdToGet.style.left=butLoc.left-96;
		divIdToGet.style.top=butLoc.top+40;
		divIdToGet.style.visibility='visible';
	
}

/////////////////////////////////functions to send/recieve to/from LMPrequests for server///////////////////////////////////////////////
function userLogin()
{
	//For testing, skipping login function--REMOVE
	//parent.frames[2].location='adminMain.htm';
	setIdCookie(F2.document.getElementById('remId'))
var o=new Object();
	
	o.sUserId=F2.document.getElementById('sUserId').value;
	o.sSis=F2.document.getElementById('sSis').value;
	
	o.onReturn="userLoginR();"
	I202_LuvMyPet_LogIn(o);
	
	
}

function userLoginR()
{

		if(F1.O202.OrigUid.substring(0,1)=='@')parent.frames[2].location='admin.htm';
		else{parent.frames[2].document.location='lmp.htm';}
		loginSelect=false;
	
		

}

function logOut()
{
var o=new Object();

	o.onReturn="userLogOutR();"
	T999_LogOut(o);
}

function userLogOutR()
{
	if(O202)O202=null;
	parent.frames[2].location='lmp.htm';
	loginSelect=false;
}
function lostPass()
{
	F1.lpSwitch=true;
	F2.document.location='registerReturnEMAIL.htm';

}
function checkPassword(pass,confirmPass)
{
	if(pass!=confirmPass)return false;
	return true;
}
///////SET COOKIE FOR REMEMBER ID////////////////////
function setIdCookie(el)
{
var name='_remId';
var value=F2.document.getElementById('sUserId').value+',BREAK,'+F2.document.getElementById('sSis').value;
	if(el.checked==true)
	{
		var today = new Date();
		var expire = new Date();
		expire.setTime(today.getTime() + 3600000*24*365);
       	document.cookie=name+"="+escape(value)+";expires="+expire.toGMTString()+"; path=/";
		if(!getCookie('_remId'))F2.alert('Your browser does not accept cookies, if you would like your login information remembered you must change your browser settings'); 
	}
	else
	{
		 var expireNow=new Date();
   		 document.cookie=name+"="+";expires=Thu,01-Jan-70 00:00:01 GMT"+ "; path=/";
		 //F2.document.getElementById('sUserId').value="";
		 //F2.document.getElementById('sSis').value="";
	
	}
}                          


function getCookie(name) 
{
    var dcookie=document.cookie; 
    var cname=name + "=";
    var clen=dcookie.length;
    var cbegin=0;
    while (cbegin < clen) 
	{
        var vbegin = cbegin + cname.length;
        if (dcookie.substring(cbegin, vbegin) == cname) 
		{ 
            var vend = dcookie.indexOf (";", vbegin);
                if(vend==-1)vend=clen;
            	return unescape(dcookie.substring(vbegin, vend));
        }
        cbegin=dcookie.indexOf(" ", cbegin)+1;
        if (cbegin==0)break;
    }
    return null;
}
///vars for browser version and OS

var exclude=1;
var agt=navigator.userAgent.toLowerCase();
var win=0;
var mac=0;
var lin=1;
var lnx=0;
var ice=0;
var ie=0;
var ie4=0;
var ie5=0;
var ie6=0;
var com=0;
var dcm=0;
var op5=0;
var op6=0;
var op7=0;
var ns=0;
var ns4=0;
var ns6=0;
var ns7=0;
var mz7=0;
var kde=0;
var saf=0;
//var for current window sizes
var sW=0;
var sH=0;
//var for eventCapture in Netscape
var mOE;






function setBrowsOs()
{
//////////////////////////loads with frame one so I fill arrays for global use here
infoButtonAry[infoButtonAry.length]="Click here to see a listing of currently scheduled pet vaccination clinics in your area. The list changes weekly.  Thanks!";
infoButtonAry[infoButtonAry.length]="Click here to register with LuvMyPet to be able to view and print your pet's vaccination certificate on your computer!  Thanks!";
infoButtonAry[infoButtonAry.length]="Click here to login after you have registered with LuvMyPet. If you forgot your password, we will email it to you. Thanks!";
infoButtonAry[infoButtonAry.length]="All your current certificates are displayed here for viewing and printing.You may also register your new certificates here.";
infoButtonAry[infoButtonAry.length]="Click here to edit your information including change your password";
infoButtonAry[infoButtonAry.length]="Remember my ID on this computer <input name='remId' id='remId' type='checkbox' value=''>";



if(agt.indexOf('win')!=-1)
{
	win=1;
	lin=0;
}

if(agt.indexOf('mac')!=-1)
{
	mac=1;
	lin=0;
}

if(lin)lnx=1;

if(typeof navigator.vendor!="undefined" && navigator.vendor=="KDE")
{
var thisKDE=agt;
var splitKDE=thisKDE.split("konqueror/");
var aKDE=splitKDE[1].split("; ");
var KDEn=parseFloat(aKDE[0]);
	if(KDEn>=2.2)
	{
		kde=1;
		ns6=1;
		exclude=0;
	}
}

else if(agt.indexOf('webtv')!=-1)exclude=1;

else if(typeof window.opera!="undefined")
{
exclude=0;
	if(agt.indexOf("opera/5")!=-1||agt.indexOf("opera 5")!=-1)op5=1;
	if(agt.indexOf("opera/6")!=-1||agt.indexOf("opera 6")!=-1)op6=1;
	if(agt.indexOf("opera/7")!=-1||agt.indexOf("opera 7")!=-1)op7=1;
}

else if(typeof document.all!="undefined"&&!kde)
{
exclude=0;
ie=1;
	if(typeof document.getElementById!="undefined")
	{
		ie5=1;
		if(agt.indexOf("msie 6")!=-1)
		{
			ie6=1;
			dcm=document.compatMode;
			if(dcm!="BackCompat")
			{
				com=1;
			}
		}
	}

	else ie4=1;
}

else if(typeof document.getElementById!="undefined")
{
exclude=0;
	if(agt.indexOf("netscape/6")!=-1||agt.indexOf("netscape6")!=-1)ns6=1;
	else if(agt.indexOf("netscape/7")!=-1||agt.indexOf("netscape7")!=-1)
	{
		ns6=1;
		ns7=1;
	}
	else if(agt.indexOf("gecko")!=-1)
	{
		ns6=1;
		mz7=1;
	}
	if(agt.indexOf("safari")!=-1 || (typeof document.childNodes!="undefined" && typeof document.all=="undefined" && typeof navigator.taintEnabled=="undefined"))
	{
	mz7=0;
	ns6=1;
	saf=1;
	}
}

else if((agt.indexOf('mozilla')!=-1)&&(parseInt(navigator.appVersion)>=4))
{
exclude=0;
ns4=1;
	if(typeof navigator.mimeTypes['*']=="undefined")
	{
		exclude=1;
		ns4=0;
	}
}

if(agt.indexOf('escape')!=-1)
{
	exclude=1;
	ns4=0;
}

if(typeof navigator.__ice_version!="undefined")
{
	exclude=1;
	ie4=0;
}
//set vars for Safaria because it also gives true to netscape
if (navigator.appName == 'Netscape')
{
	ns=true;
}

if (saf)
{
	ie=false;
	ns7=false;
}

//F1.tAlerts to see browser version
//tAlert('internet explore= '+ie);
//tAlert('netscape= '+ns);
//F1.tAlert('safari= '+saf);

if (ns4||ns6||ns7)
{
	//F1.tAlert('init for Netscape');
	document.captureEvents(Event.MOUSEOUT);
	document.onmouseout= netMouseOut;
}

}


function netMouseOut(e)
{

 mOE=e;

}

function getElementPosition(elem,w) 
{
    if(!w)w=window;
	var offsetTrail = elem;
    var offsetLeft = 0;
    var offsetTop = 0;
	
    while (offsetTrail) 
	{
        offsetLeft += offsetTrail.offsetLeft;
        offsetTop += offsetTrail.offsetTop;
        offsetTrail = offsetTrail.offsetParent;
	
    }
	//F1.tAlert('left= '+offsetLeft+'  top= '+offsetTop);
	return {left:offsetLeft, top:offsetTop};
	
    if (navigator.userAgent.indexOf("Mac") != -1
        && typeof w.document.body.leftMargin != "undefined") 
	{	
    
	    offsetLeft += w.document.body.leftMargin;
        offsetTop += w.document.body.topMargin;
		
		//F1.tAlert('left= '+offsetLeft+'  top= '+offsetTop);
    }
    return {left:offsetLeft, top:offsetTop};
}

function positionDiv(elementToPosition,x,y)
{
		
	
 var ofB=getElementPosition(F2.document.getElementById('marker'));
 
 	if (ns4||ns6||ns7)
	{
		if(!x || !y)
		{
			F2.document.getElementById(elementToPosition).style.top=(ofB.top+0);
 			F2.document.getElementById(elementToPosition).style.left=(ofB.left-50);
		}
		else
		{
			F2.document.getElementById(elementToPosition).style.top=(ofB.top+y);
 			F2.document.getElementById(elementToPosition).style.left=(ofB.left-x);
		}
	}
	else
 	{
 		if(!x || !y)
		{
			F2.document.getElementById(elementToPosition).style.top=(ofB.top+0);
 			F2.document.getElementById(elementToPosition).style.left=(ofB.left-50);
		}
		else
		{
			
			F2.document.getElementById(elementToPosition).style.top=(ofB.top+y);
 			F2.document.getElementById(elementToPosition).style.left=(ofB.left-x);
		}
 	}


}
