/**********************************************************************************   
PopupDescriptions 
*   Copyright (C) 2001 Thomas Brattli
*   This script was released at DHTMLCentral.com
*   Visit for more great scripts!
*   This may be used and changed freely as long as this msg is intact!
*   We will also appreciate any links you could give us.
*
*   Made by Thomas Brattli
*
*   Script date: 09/04/2001 (keep this date to check versions) 
*********************************************************************************/
function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=(navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw=lib_bwcheck()

/***************************************************************************************
Variables to set:
***************************************************************************************/
messages=new Array()
//Write your descriptions in here.
messages[0] = "<b>How to use this tool</b><br>1. Enter the exact website address of the page you want to check the backlinks for into the text box.<br>(eg. www.odesignweb.com)<br>2. Click the 'Check!' button.<br>The results will be shown in a table, 20 results per page will be displayed."
messages[1] = "<b>How to use this tool</b><br>1. Enter a domain name. You can enter up to 5 different domains to compare.<br> 2. Choose your Data Type using the dropdown box next to it.<br> 3. Choose your Data Range using the dropdown box next to it.<br> 4. Click the 'View!' button where you are done."
messages[2] = "<b>How to use this tool</b><br>1. Enter the exact website address of the page you want to check the prediction for into the text box. (eg. www.iwebtool.com/tools)<br>You can enter up to 10 different websites to check the prediction for. After entering the first address, press Enter and enter a new address on the new line.<br>2. Click the 'Check!' button."
messages[3] = "<b>How to use this tool</b><br>1. Enter website URL.<br>2. Click 'Check!' button."
messages[4] = "<b>How to use this tool</b><br>1. Enter the exact website address of the page you want to view. (eg. www.odesignweb.com)<br>2. Enter keywords you want to search for.<br>3. Click the 'View/Check!' button."
messages[5] = "<b>How to use this tool</b><br>1. Enter the exact website address of the page you want to check the PageRank for into the text box. (eg. www.iwebtool.com/tools/)<br>2. Click the 'Check!' button"
messages[6] = "<b>How to use this tool</b><br>1. Enter the exact website address of the page you want to check the ranking for into the text box. (eg. www.iwebtool.com/tools)<br>2. Click the 'Check!' button"
messages[7] = "<b>How to use this tool</b><br>1. Enter the exact website address of the page you want to the tool to search for. (eg. www.iwebtool.com)<br>2. Select which search engine you want the tool to search through.<br>3. Select the limit number of results you want to search.<br>4. Enter Keywords you want the tool to search for.<br>5. Click the 'Check!' button "
messages[8] = "<b>How to use this tool</b><br>1. Enter a Title, Description and Website Address.<br>You may want to enter a search keyword to view how users will see your listing when a particular keyword is searched.<br>2. Click the 'Show me a preview!' button."
messages[9] = "<b>How to use this tool</b><br>1. Enter the exact domain name to check domain availability.<br>2. You can also select the option to view additional domain names.<br>3. Click 'Go!' to view available domain names."
messages[10] = "<b>How to use this tool</b><br>1. Enter the domain name you want to check.(eg. www.odesignweb.com)<br>2. Click the 'Check!' button."
messages[11] = "<b>How to use this tool</b><br>1. Enter the website domain you want to check the whois information for into the text box. (eg. www.odesignweb.com)<br>2. Click the 'Go!' button"
messages[12] = "<b>How to use this tool</b><br>1. Enter the IP addresses in the search box.<br>2. Press the 'Check!' button."
messages[13] = "<b>How to use this tool</b><br>1. Enter the exact website URL you want the tool to calculate.<br>2. Click 'Check!' button."
messages[14] = "<b>How to use this tool</b><br>1. Enter the address of the page you want to check the speed for into the text box. (eg. www.iwebtool.com/tools)<br>You can enter up to 10 different websites to check the speed for. After entering the first address, press Enter and enter a new address on the new line.<br>2. Click the 'Check!' button. "
messages[15] = "<b>How to use this tool</b><br>1. Enter a domain name.(eg. iwebtool.com).<br>2. Click 'Go!' button."
messages[16] = "<b>How to use this tool</b><br>1. Enter text to encrypt.<br>2. Click 'Encrypt!' button"
messages[17] = "<b>How to use this tool</b><br>1. Click the button labeled 'View my Internet and Browser details!'."
messages[18] = "<b>How to use this tool</b><br>1. Paste the HTML source code you want to optimize.<br>2. Click 'Optimize!' button"
messages[19] = "<b>How to use this tool</b><br>1. Enter website title - Please note, longer titles are usually better.<br>2. Enter website description.<br>3. Enter website keywords - Please separate each keyword with a comma.<br>4. Enter website author.<br>5. Click 'Go!' button."

//To have more descriptions just add to the array.

fromX = 50 //How much from the actual mouse X should the description box appear?
fromY = -20 //How much from the actual mouse Y should the description box appear?

//To set the font size, font type, border color or remove the border or whatever,
//change the clDescription class in the stylesheet.

//Makes crossbrowser object.
function makeObj(obj){								
   	this.evnt=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj]:0;
	if(!this.evnt) return false
	this.css=bw.dom||bw.ie4?this.evnt.style:bw.ns4?this.evnt:0;	
   	this.wref=bw.dom||bw.ie4?this.evnt:bw.ns4?this.css.document:0;		
	this.writeIt=b_writeIt;																
	return this
}

// A unit of measure that will be added when setting the position of a layer.
var px = bw.ns4||window.opera?"":"px";

function b_writeIt(text){
	if (bw.ns4){this.wref.write(text);this.wref.close()}
	else this.wref.innerHTML = text
}

//Capturing mousemove
var descx = 0
var descy = 0
function popmousemove(e){descx=bw.ns4||bw.ns6?e.pageX:event.x; descy=bw.ns4||bw.ns6?e.pageY:event.y}

var oDesc;
//Shows the messages
function popup(num){
    if(oDesc){
		oDesc.writeIt('<div class="clDescription">'+messages[num]+'</div>')
		if(bw.ie5||bw.ie6) descy = descy+document.body.scrollTop
		oDesc.css.left = (descx+fromX)+px
		oDesc.css.top = (descy+fromY)+px
		oDesc.css.visibility = "visible"
    }
}
//Hides it
function popout(){
	if(oDesc) oDesc.css.visibility = "hidden"
}
function setPopup(){
   	if(bw.ns4)document.captureEvents(Event.MOUSEMOVE)
    document.onmousemove = popmousemove;
	oDesc = new makeObj('divDescription')
}
