function openwin(url, width, height,tit)
{
win1 = open("", "_blank", "toolbar=0,status=0,location=0,menubar=0,directories=0,scrollbars=0,resizeable=0,width="+width+",height="+height);
win1.document.open();
win1.document.write("<html><head><title>"+tit+"</title></head><body bgcolor=#ffffff leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><img src="+url+" border=0></body></html>");
win1.document.close();
}


function openwindow(url, width, height)
{
link = window.open(url,"Link","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=auto,resizable=1,width="+width+",height="+height);
link.focus()
}

function open_bundle_win(url)
{
link = window.open(url,"BundleLink","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=auto,resizable=1,width=600, height=290, left=120,top=190");
link.focus()
}

function open_bundle_specwin(url, width, height)
{
link = window.open(url,"BundleLink","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=auto,resizable=1,width="+width+",height="+height+", left=120,top=190");
link.focus()
}


function Compatib(url) {
link = window.open(url,"CompatibLink","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=auto,resizable=1,width=400,height=400,left=100,top=80");
link.focus()
}


var popwin = null;
function SendLink(page)
{
	var left, top, winWidth, winHeight;
	var wConfig, url;
	winWidth = 350;
	winHeight = 400;
	url = "/js/"+page;
	wConfig="status=0,resizable=1,location=0,scrollbars=auto,toolbar=0,width="+winWidth+",height="+winHeight+",top=0,left=50";
	
	if ((popwin == null) || (popwin.closed)){
		popwin=window.open(url, "popwin", wConfig);
	}
	else {
		popwin.focus();
		popwin.location.href=url;
	}
	return false;
}


var win=null;
function SpxPromo(mypage,myname,w,h,pos,infocus){
//if(GetCookie("sid") == "999"){return;}
//document.cookie="sid=999; Path=/; Expires= " + getFuture(1);
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=(screen.width)?(screen.width-w)-23:100;mytop=(screen.height)?(screen.height-h)-80:100;}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=auto,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
win.focus();}

function getFuture(f){
var d = new Date();
d.setTime(d.getTime() + (86400000 * f));
return d;
}

function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
  var j = i + alen;
  if (document.cookie.substring(i, j) == arg)
  return getCookieVal (j);
  i = document.cookie.indexOf(" ", i) + 1;
  if (i == 0) break; 
  }
  return null;
  }

function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
  endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}



function product_win(url)
{
link = window.open(url,"Link","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=400,height=400,left=100,top=80");
link.focus()
}


function text() {
};

text = new text();
number = 0;

// textArray
text[number++] = "http://www.medicalspellchecker.com/home.htm"
text[number++] = "http://www.medispell.com/home.htm"
text[number++] = "http://www.spelling-software.com/home.htm"
text[number++] = "http://spellex.co.uk/home.htm"

increment = Math.floor(Math.random() * number);

//document.write(text[increment]);
 
var win=null;
function Link()
{
w = 485;
h = 115;
myname = link;
myleft=(screen.width)?(screen.width-w)-23:100;
mytop=20;

settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";
win=window.open(text[increment],myname,settings);
win.focus();
}

//Tooltips
var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0

if(ns)
{
 doc = "document."; sty = ""
}

if(ie)
{
 doc = "document.all."; sty = ".style"
}

var initialize = 0
var Ex, Ey, topColor, subColor, ContentInfo

if(ie)
{
	Ex = "event.x"
	Ey = "event.y"
	topColor = "#808080"
	subColor = "#DDDDDD"
}

if(ns)
{
	Ex = "e.pageX"
	Ey = "e.pageY"
	window.captureEvents(Event.MOUSEMOVE)
	window.onmousemove=overhere
	topColor = "#808080"
	subColor = "#DDDDDD"
}

function MoveToolTip(layerName, FromTop, FromLeft, e)
{
	if(ie)
	{
		eval(doc + layerName + sty + ".top = "  + (eval(FromTop) + document.body.scrollTop))
	}
	
	if(ns)
	{
		eval(doc + layerName + sty + ".top = "  +  eval(FromTop))
	}
	eval(doc + layerName + sty + ".left = " + (eval(FromLeft) + 15))
}

function ReplaceContent(layerName)
{
	if(ie)
	{
		document.all[layerName].innerHTML = ContentInfo
	}

	if(ns)
	{
		with(document.layers[layerName].document) 
		{ 
		   open(); 
		   write(ContentInfo); 
		   close(); 
		}
	}
}

function Activate(){initialize=1}
function deActivate(){initialize=0}


function overhere(e)
{
	if(initialize)
	{
		MoveToolTip("ToolTip", Ey, Ex, e)
		eval(doc + "ToolTip" + sty + ".visibility = 'visible'")
	}
	else
	{
		MoveToolTip("ToolTip", 0, 0)
		eval(doc + "ToolTip" + sty + ".visibility = 'hidden'")
	}
}

function EnterContent(layerName, TTitle, TContent)
{
ContentInfo = '<table border="0" width="150" cellspacing="0" cellpadding="0">'+
'<tr><td width="100%" bgcolor="#000000">'+
'<table border="0" width="100%" cellspacing="1" cellpadding="0">'+
'<tr><td width="100%" bgcolor='+topColor+'>'+
'<table border="0" width="90%" cellspacing="0" cellpadding="0" align="center">'+
'<tr><td width="100%">'+
'<font class="tooltiptitle">&nbsp;'+TTitle+'</font>'+
'</td></tr>'+
'</table>'+
'</td></tr>'+
'<tr><td width="100%" bgcolor='+subColor+'>'+
'<table border="0" width="90%" cellpadding="0" cellspacing="1" align="center">'+
'<tr><td width="100%">'+
'<font class="tooltipcontent">'+TContent+'</font>'+
'</td></tr>'+
'</table>'+
'</td></tr>'+
'</table>'+
'</td></tr>'+
'</table>';

ReplaceContent(layerName)
}
// end of tooltips