	if (typeof htwide == 'undefined') {var htwide = "350";}
	if (typeof htborder == 'undefined') {var htborder = "3";}
	if (typeof offsetx == 'undefined') {var offsetx = 10;}
	if (typeof offsety == 'undefined') {var offsety = 10;}
	if (typeof adjy == 'undefined') {var adjy = 0;}
	if (typeof foreground == 'undefined') { var foreground = "#CECE9C";}
	if (typeof menubackground == 'undefined') {	var menubackground = "#CCCCFF";}
	if (typeof backcolor == 'undefined') {var backcolor = "#333399";}
	if (typeof textcolor == 'undefined') {var textcolor = "#000000";}
	if (typeof closecolor == 'undefined') {var closecolor = "#9999FF";}
	if (typeof headlinecolor == 'undefined') {var headlinecolor = "#E6C542";}
	if (typeof headlinefont == 'undefined') {var headlinefont = "Arial,Helvetica";}
	if (typeof headlinesize == 'undefined') {var headlinesize = "2";}
	if (typeof headlineweight == 'undefined') {var headlineweight = "<b>";}
	if (typeof headlinecloseweight == 'undefined') {var headlinecloseweight = "</b>";}
	if (typeof textfont == 'undefined') {var textfont = "Arial,Helvetica";}
	if (typeof textsize == 'undefined') {var textsize = "2";}
	if (typeof textweight == 'undefined') {var textweight = "";}
	if (typeof textcloseweight == 'undefined') {var textcloseweight = "";}
	if (typeof closefont == 'undefined') {var closefont = "Arial,Helvetica";}
	if (typeof closesize == 'undefined') {var closesize = "2";}
	

	nscape4 = (document.layers)? true:false
	msie4 = (document.all)? true:false
	msie5=false;
	if (msie4)
		{
		if (navigator.userAgent.indexOf('MSIE 5') >0 || navigator.userAgent.indexOf('MSIE 6') >0 || navigator.userAgent.indexOf('MSIE 7') >0)
			{
			msie5=true;
			}
		}
	var x = 0;
	var y = 0;
	var showmotion = 0;
	var staset = 0;
	var counter = 0;
	var orient = 1;
	var links = 0;
	var pLoc= ""  // use maplinks variable  POSleft POSright POScenter
	var adjman=0;
	

	if ( (nscape4) || (msie4) ) 
		{
		if (nscape4) over = document.overDiv
		if (msie4) over = overDiv.style
		document.onmousemove = mouseMove
		if (nscape4) document.captureEvents(Event.MOUSEMOVE)
		}

// Standard Hot Tag Automatic Orientation
function hta(text,headline, titles, maplinks, gifloc, gif, marquee, marqlink) 
	{
	pLoc=maplinks;
	adjman=gifloc;
	
	hottag(text);
	}


// Headline Hot Tag Automatic Orientation
function hhta(text,headline, titles, maplinks, gifloc, gif, marquee, marqlink) 
	{
	
	pLoc=maplinks;
	adjman=gifloc;
	headlinetag(text,headline);
	}

// Stationary Headline Hot Tag Automatic Orientation
function shtc(text,headline, titles, maplinks, gifloc, gif, marquee, marqlink) 
	{
	pLoc=maplinks;
	adjman=gifloc;
	Stationarytag(text,headline);
	}


// MAP Hottag - Stationary with GIF and Image Map
function mhta(text, headline, titles, maplinks, gifloc, gif, marquee, marqlink) 
	{
	MyTitles = new MakeArray(10);
	MyLinks = new MakeArray(10);
	var links = -1;
	var shString=titles;
	var PosAt=shString.indexOf("~~");
	while (PosAt > -1)
		{
		links++;
		MyTitles[links]=shString.substring(0,PosAt);
		shString=shString.substring(PosAt+2, shString.length);
		PosAt=shString.indexOf("~~");
		}
	if (shString.length > 0)
		{
		links++;
		MyTitles[links]=shString;
		}
	var links = -1;
	var shString=maplinks;
	var PosAt=shString.indexOf("~~");
	while (PosAt > -1)
		{
		links++;
		MyLinks[links]=shString.substring(0,PosAt);
		shString=shString.substring(PosAt+2, shString.length);
		PosAt=shString.indexOf("~~");
		}
	if (shString.length > 0)
		{
		links++;
		MyLinks[links]=shString;
		}
	var ugif="";
	var lgif="";
	var marqst="";
		
	if (gifloc == "ur")
		{
		ugif="<img src=\"http://www.hotperl.com/images/" + gif + "\"  border=0 align=right>";
		}
	if (gifloc == "lr")
		{
		lgif="<img src=\"http://www.hotperl.com/images/" + gif + "\"  border=0 align=right>";
		}
	if (marquee.length > 0)
		{
		marqst = "<tr><td valign=top align=center colspan=2><font color='navy' size='2' face='Arial'>"
		if (marqlink.length > 0 )
			{
			marqst = marqst + "<A  HREF=\"javascript:HOTPerl_Link('"+ marqlink + "')\">"
			}
	
		marqst = marqst + "<marquee height='15' scrollamount='2' width='" + (htwide - 20) + "' border='0'>" + marquee + "</marquee>"
		
		if (marqlink.length > 0 )
			{
			marqst = marqst + "</A>"
			}
		marqst = marqst + "</font></td></tr>";
		}
		
	Maptag(text,headline, links, ugif, lgif, marqst);
	}
	
// Clears Hot Tag appropriate
function htclose() 
	{
	if ( counter >= 1 ) { staset = 0 };
	if ( (nscape4) || (msie4) ) 
		{
		if ( staset == 0 ) 
			{
			showmotion = 0;
			hideHotTag(over);
			} 
		else 
			{
			counter++;
			}
		}
	}


// Simple Hot Tag
function hottag(text) 
	{
	txt = "<TABLE WIDTH="+htwide+" foreground=0 CELLPADDING="+htborder+" CELLSPACING=0 BGCOLOR=\""+backcolor+"\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=\""+foreground+"\"><TR><TD><FONT FACE=\"Arial,Helvetica\" COLOR=\""+textcolor+"\" FACE=\""+textfont+"\" SIZE=\""+textsize+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>"
	layerWrite(txt);
	disp();
}

// Headline Hot Tag
function headlinetag(text, headline) 
	{
	txt = "<TABLE WIDTH="+htwide+" BORDER=0 CELLPADDING="+htborder+" CELLSPACING=0 BGCOLOR=\""+backcolor+"\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><SPAN ID=\"HeadlineTag\"><B><FONT COLOR=\""+headlinecolor+"\" FACE=\""+headlinefont+"\" SIZE=\""+headlinesize+"\">"+headlineweight+headline+"</FONT>"+headlinecloseweight+"</SPAN></TD></TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=\""+foreground+"\"><TR><TD><SPAN ID=\"BodyTag\"><FONT COLOR=\""+textcolor+"\" FACE=\""+textfont+"\" SIZE=\""+textsize+"\">"+textweight+text+textcloseweight+"</FONT>"
	
	txt = txt + " <SPAN></TD></TR></TABLE></TD></TR></TABLE>"
	layerWrite(txt);
	disp();
	}

// Stationary Hot Tag
function Stationarytag(text, headline) 
	{
	staset = 1;
	counter = 0;
	txt = "<TABLE WIDTH="+htwide+" BORDER=0 CELLPADDING="+htborder+" CELLSPACING=0 BGCOLOR=\""+backcolor+"\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><SPAN ID=\"HeadlineTag\"><FONT  COLOR=\""+headlinecolor+"\" FACE=\""+headlinefont+"\" SIZE=\""+headlinesize+"\">"+headlineweight+headline+headlinecloseweight+"</FONT></SPAN></TD><TD ALIGN=RIGHT><A HREF=\"/\" onMouseOver=\"cClick();\" ID=\"CloseTag\"><FONT COLOR=\""+closecolor+"\" size=\""+closesize+"\"  FACE=\""+closefont+"\" ><b>Close</b></FONT></A></TD></TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=\""+foreground+"\"><TR><TD><SPAN ID=\"BodyTag\"><FONT COLOR=\""+textcolor+"\" FACE=\""+textfont+"\" SIZE=\""+textsize+"\">"+textweight+text+textcloseweight+"</FONT><SPAN></TD></TR></TABLE></TD></TR></TABLE>"
	layerWrite(txt);
	disp();
	showmotion = 0;
	}

// MAP Hot Tag
function Maptag(text, headline,links, ugif, lgif, marqst) 
	{
	staset = 1;
	counter = 0;
	txt = "<TABLE WIDTH="+htwide+" BORDER=0 CELLPADDING="+htborder+" CELLSPACING=0 BGCOLOR=\""+backcolor+"\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><SPAN ID=\"HeadlineTag\"><B><FONT  COLOR=\""+headlinecolor+"\">"+headline+"</FONT></B></SPAN></TD><TD ALIGN=RIGHT><A HREF=\"/\" onMouseOver=\"cClick();\" ID=\"CloseTag\"><FONT  COLOR=\""+closecolor+"\"><b>Close</b></FONT></A></TD></TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=\""+menubackground+"\"><TR><TD valign=top align=center><img src=\"http://www.hotperl.com/images/bluebullet2.gif\" HSPACE=2 WIDTH=7 HEIGHT=10  BORDER=0></td><td valign=top align=left><SPAN ID=\"BodyTag\"><FONT COLOR=\""+textcolor+"\">"+ugif + text + "</FONT></span></td></tr>"
	
	for (var x = 0; x <=links; x++)
	{

	txt = txt + "<tr><td valign=top align=center><img src=\"http://www.hotperl.com/images/arrow2.gif\" HSPACE=2 WIDTH=7 HEIGHT=10  BORDER=0></td><td valign=top align=left><SPAN ID=\"BodyTag\"><FONT COLOR=\""+textcolor+"\"><A  HREF=\"javascript:HOTPerl_Link('"+MyLinks[x]+"')\">"
	
	if (x == links)
		{
		txt = txt + lgif + MyTitles[x];
		}
	else
		{
		txt = txt + MyTitles[x];
		}
	txt = txt + "</a></span></td></tr>"

	}
	
	txt = txt + marqst + "</TABLE></TD></TR></TABLE>"
	layerWrite(txt);
	disp();
	showmotion = 0;
	}
// Global Routines
function disp() 
	{
	if ( (nscape4) || (msie4) ) 
		{
		//if (nscape4) {x=e.pageX; y=e.pageY}
		if (msie4) {x=event.x; y=event.y}
		if (msie5) {x=event.x+document.body.scrollLeft;
			y=event.y+document.body.scrollTop;}
		CalcAuto(x,y);
		showHotTag(over);
		showmotion = 1;
		}
}
// Show the Hot Tag
function showHotTag(obj) 
	{
	if (nscape4) obj.visibility = "show"
	else if (msie4) obj.visibility = "visible"
	}

// Hide the Hot Tag
function hideHotTag(obj) 
	{
	if (nscape4) obj.visibility = "hide"
	else if (msie4) obj.visibility = "hidden"
	}

// Move a layer
function moveTo(obj,xL,yL) 
	{
	obj.left = xL
	obj.top = yL
	}

// Writes to a layer
function layerWrite(txt) 	
		{
        if (nscape4) 
			{
			var lyr = document.overDiv.document
			lyr.write(txt)
			lyr.close()
        	}
        else if (msie4) document.all["overDiv"].innerHTML = txt
		}



// Follow the Mouse Movements
function mouseMove(e) 
	{
	if (showmotion) 
		{
		if (nscape4) {x=e.pageX; y=e.pageY}
		if (msie4) {x=event.x; y=event.y}
		if (msie5) {x=event.x+document.body.scrollLeft;
			y=event.y+document.body.scrollTop;}
		CalcAuto(x,y);
		}
	}

// Calcualte the location for automatic
function CalcAuto(x,y)
{

	adjy=0;
	
	if (y > 200)
		{
		//adjy=-90;
		}
	if (pLoc == "POSleftTOP" || pLoc == "POScenterTOP" || pLoc == "POSrightTOP")
		{
		adjy=-80;
		}

	if (pLoc == "POSleft"  || pLoc == "POSleftTOP") // tag left of field
		{
		moveTo(over,x-offsetx-htwide + adjman,y+offsety+adjy);
		}
	else if (pLoc == "POScenter" || pLoc == "POScenterTOP")  // ----center tag on a name
		{
		moveTo(over,x+offsetx+adjman-(htwide/2),y+offsety + adjy);
		}
	else if (pLoc == "POSright" || pLoc == "POSrightTOP")  // ----tag right to a name
		{
		moveTo(over,x+offsetx + adjman,y+offsety+adjy);
		}
	else if (x > 400 )
		{
		moveTo(over,x-offsetx-htwide,y+offsety+adjy);
		}
	else if (x > 200 )
		{
		moveTo(over,x+offsetx-(htwide/2),y+offsety+adjy);
		}
	else 
		{
		moveTo(over,x+offsetx,y+offsety+adjy);
		}
	
}
// The Close onMouseOver function for Stationary Tag
function cClick() 
	{
	hideHotTag(over);
	staset=0;
	}

// Make an Array 
function MakeArray(n)
	{
this.length=n;
for (var x = 1; x <=n; x++)
	{
	this[x];
	}
return this;
}