/*

		==========================
		EDITABLE TOOLTIP VARIABLES
		==========================

*/


/*
AD UNIT STYLE
-------------
Determine le style de la boite. les valeurs possible :
1 = Text Only 
2 = Small Logo
3 = Brandbox
4 = Billboard
5 = Freeform
6 = HTML Expandable/Widescreen
7 = IFrame
8 = Site Results
20 = All-Flash
21 = All-Flash Expandable MPU
*/
var styleArray = new Array();
styleArray[0] = 6;
styleArray[1] = 5;
styleArray[2] = 5;
styleArray[3] = 7;
styleArray[4] = 5;
styleArray[5] = 5;
styleArray[6] = 6;

/*
AD UNIT TITLE
-------------
Texte affiché avant le corps (body) de chaque boite
*/
var titleArray = new Array();
titleArray[0] = "Webmestre <br> DUFOUR Michel";
titleArray[1] = "Sernavision";
titleArray[2] = "Sernavision";
titleArray[3] = "Sernavision";
titleArray[4] = "Sernavision";
titleArray[5] = "Sernavision";
titleArray[6] = "Webmestre <br> DUFOUR Michel";

/*
AD UNIT BODY TEXT
-----------------
Texte affiché dans le corps (body) de chaque boite
*/
var bodyArray = new Array();
bodyArray[0] = "";
bodyArray[1] = "";
bodyArray[2] = "";
bodyArray[3] = "";
bodyArray[4] = "";
bodyArray[5] = "";
bodyArray[6] = "";

/*
AD UNIT DISPLAY LINK
--------------------
Texte afficher pour l'"URL" visibles de chaque Boite
*/
var linkArray = new Array();
linkArray[0] = "http://www.sernavision.com";
linkArray[1] = "http://www.sernavision.com";
linkArray[2] = "http://www.sernavision.com";
linkArray[3] = "http://www.sernavision.com";
linkArray[4] = "http://www.sernavision.com";
linkArray[5] = "http://www.sernavision.com";
linkArray[6] = "http://www.sernavision.tv";

var listHeader = new Array();
listHeader[0] = "Related Articles";
listHeader[1] = "Related Articles";
listHeader[2] = "Related Articles";
listHeader[3] = "Related Articles";
listHeader[4] = "Related Articles";
listHeader[5] = "Related Articles";
listHeader[6] = "Related Articles";

/*
ARTICLE TITLES
-----------
This is used for Vibrant Site Results
*/
var articleTitle = new Array();
articleTitle[0] = [""];
articleTitle[1] = [""];
articleTitle[2] = [""];
articleTitle[3] = [""];
articleTitle[4] = [""];
articleTitle[5] = [""];
articleTitle[6] = [""];


					
/*
ARTICLE SUMMARIES
-----------
This is used for Vibrant Site Results
*/
var articleSummary = new Array();
articleSummary[0]=[""];
articleSummary[1]=[""];
articleSummary[2]=[""];
articleSummary[3]=[""];
articleSummary[4]=[""];
articleSummary[5]=[""];
articleSummary[6]=[""];

/*
ARTICLE URLS
-----------
This is used for Vibrant Site Results
*/
var articleLink = new Array();
articleLink[0] = [""];					
articleLink[1] = [""];
articleLink[2] = [""];					
articleLink[3] = [""];
articleLink[4] = [""];
articleLink[5] = [""];
articleLink[6] = [""];

/*
AD UNIT URL
-----------
Default value for the click-through URL. This is the URL that will be launched when the user clicks on the keyword or ad unit (unless the unit is multi-link). NOTE: This URL will NOT launch when the user clicks on any area composed of Flash. Flash clickURLs will need to be passed through via the creative source string
*/
var urlArray = new Array();
urlArray[0] = "http://www.sernavision.com/";
urlArray[1] = "http://www.sernavision.com/";
urlArray[2] = "http://www.sernavision.com/";
urlArray[3] = "http://www.sernavision.com/";
urlArray[4] = "http://www.sernavision.com/";
urlArray[5] = "http://www.sernavision.com/";
urlArray[6] = "http://www.sernavision.com/";

/*
CREATIVE SOURCE
---------------
Path to the ad unit creative. This URL should lead to the Flash, graphic, or iframe source you want to display. This will also contain any query strings (including the clickURL) you wish to pass into the Flash unit.
*/
var creativeArray = new Array();
creativeArray[0] = "http://www.sernavision.com/dm_popup/dmdesign.swf";
creativeArray[1] = "http://www.sernavision.com/dm_popup/disclamer.jpg";
creativeArray[2] = "http://www.sernavision.com/images/jwplayerserna.jpg";
creativeArray[3] = "http://www.sernavision.com/";
creativeArray[4] = "http://www.sernavision.com/";
creativeArray[5] = "http://www.sernavision.com/";
creativeArray[6] = "http://www.sernavision.com/dm_popup/dmdesign.swf";

/*
ADTYPE LOGO
-----------
this determines what logo you would like to have in the top right corner of the adunit
*/
var adTypeLogo = new Array();
adTypeLogo[0] = "http://www.sernavision.com/dm_popup/dm2.gif"
adTypeLogo[1] = "http://www.sernavision.com/dm_popup/dm2.gif"
adTypeLogo[2] = "http://www.sernavision.com/dm_popup/dm2.gif"
adTypeLogo[3] = "http://www.sernavision.com/dm_popup/dm2.gif"
adTypeLogo[4] = "http://www.sernavision.com/dm_popup/dm2.gif"
adTypeLogo[5] = "http://www.sernavision.com/dm_popup/dm2.gif"
adTypeLogo[6] = "http://www.sernavision.com/dm_popup/dm2.gif"

//TOOLTIP SEARCH LOGO SOURCE URL
var logoArray = new Array();
logoArray[0] = "http://www.sernavision.com/dm_popup/dm2.gif";
logoArray[1] = "http://www.sernavision.com/dm_popup/dm2.gif";
logoArray[2] = "http://www.sernavision.com/dm_popup/dm2.gif";
logoArray[3] = "http://www.sernavision.com/dm_popup/dm2.gif";
logoArray[4] = "http://www.sernavision.com/dm_popup/dm2.gif";
logoArray[5] = "http://www.sernavision.com/dm_popup/dm2.gif";
logoArray[6] = "http://www.sernavision.com/dm_popup/dm2.gif";

//TOOLTIP BOX DEFAULT WIDTH
var formwidth = 150;

/*
CREATIVE WIDTH
--------------
Initial display width (in pixels) of the Flash or graphic
*/
var creativeWidth = new Array();
creativeWidth[0] = 150;
creativeWidth[1] = 267;
creativeWidth[2] = 559;
creativeWidth[3] = 310;
creativeWidth[4] = 372;
creativeWidth[5] = 372;
creativeWidth[6] = 150;

/*
CREATIVE HEIGHT
---------------
Initial display height (in pixels) of the Flash or graphic. Widescreen: initial height +20
*/
var creativeHeight = new Array();
creativeHeight[0] = 100;
creativeHeight[1] = 135;
creativeHeight[2] = 167;
creativeHeight[3] = 70;
creativeHeight[4] = 258;
creativeHeight[5] = 258;
creativeHeight[6] = 100;

/*
MAXIMUM CREATIVE WIDTH
----------------------
For use in exapandable units: Final display width (in pixels) of the Flash or graphic. MPU expandable: MPU width +14
*/
var maxCreativeWidth = new Array();
maxCreativeWidth[0] = 314;
maxCreativeWidth[1] = 314;
maxCreativeWidth[2] = 314;
maxCreativeWidth[3] = 180;
maxCreativeWidth[4] = 314;
maxCreativeWidth[5] = 314;
maxCreativeWidth[6] = 314;

/*
MAXIMUM CREATIVE HEIGHT
-----------------------
For use with expandable units: Final display height (in pixels) of the Flash or graphic. MPU expandable: MPU height +49, Widescreen: final height +20
*/
var maxCreativeHeight = new Array();
maxCreativeHeight[0] = 220;
maxCreativeHeight[1] = 299;
maxCreativeHeight[2] = 145;
maxCreativeHeight[3] = 200;
maxCreativeHeight[4] = 299;
maxCreativeHeight[5] = 299;
maxCreativeHeight[6] = 220;

/*
AD UNIT TAB TITLE 1
-------------------
Text displayed in the tab shaped area in the very top left of the ad unit (usually reads "Advertisement") 
*/
var tab1Array = new Array();
tab1Array[0] = "Information";
tab1Array[1] = "Information";
tab1Array[2] = "Information";
tab1Array[3] = "Information";
tab1Array[4] = "Information";
tab1Array[5] = "Information";
tab1Array[6] = "Information";

/*
AD UNIT OFFSET X
----------------
Distance, horizontal in pixels, along the x coordinate plane to shift the positioning of the ad unit when it appears. Negative values move the unit left, positive values move the unit right. 
*/
var xOffsetArray = new Array();

xOffsetArray[0] = -200;
xOffsetArray[1] = -100;
xOffsetArray[2] = 215;
xOffsetArray[3] = 0;
xOffsetArray[4] = 0;
xOffsetArray[5] = 0;
xOffsetArray[6] = 0;

/*
AD UNIT OFFSET Y
----------------
Distance, vertical  in pixels, along the y coordinate plane to shift the positioning of the ad unit when it appears. Negative values move the unit up, positive values move the unit down. 
*/
var yOffsetArray = new Array();

yOffsetArray[0] = -200;
yOffsetArray[1] = -60;
yOffsetArray[2] = 190;
yOffsetArray[3] = 0;
yOffsetArray[4] = 0;
yOffsetArray[5] = 0;
yOffsetArray[6] = 0;


var FFxOffsetArray = new Array();

FFxOffsetArray[0] = -100;
FFxOffsetArray[1] = -90;
FFxOffsetArray[2] = 190;
FFxOffsetArray[3] = 0;
FFxOffsetArray[4] = 0;
FFxOffsetArray[5] = 0;
FFxOffsetArray[6] = 0;

/*
AD UNIT OFFSET Y
----------------
Distance, in pixels, along the y coordinate plane to shift the positioning of the ad unit when it appears. Negative values move the unit up, positive values move the unit down. 
*/
var FFyOffsetArray = new Array();

FFyOffsetArray[0] = -100;
FFyOffsetArray[1] = 15;
FFyOffsetArray[2] = 240;
FFyOffsetArray[3] = 0;
FFyOffsetArray[4] = 0;
FFyOffsetArray[5] = 0;
FFyOffsetArray[6] = -80;

/*
AD UNIT WIDTH
-------------
Width, in pixels, of the entire ad unit (including drop shadow) 
*/
var adUnitWidth = new Array();
adUnitWidth[0] = 215;
adUnitWidth[1] = 320;
adUnitWidth[2] = 240;
adUnitWidth[3] = 320;
adUnitWidth[4] = 320;
adUnitWidth[5] = 320;
adUnitWidth[6] = 215;

/*
AD UNIT HEIGHT
--------------
Height, in pixels, of the entire ad unit (including drop shadow) 
*/
var adUnitHeight = new Array();
adUnitHeight[0] = 143;
adUnitHeight[1] = 143;
adUnitHeight[2] = 170;
adUnitHeight[3] = 210;
adUnitHeight[4] = 210;
adUnitHeight[5] = 210;
adUnitHeight[6] = 143;

/*
LEARN MORE BUTTON
-----------------
Name of the learn more button file. Can be swapped depending on the language. Possible values are: "bt_lm_dnsh.gif", "bt_lm_eng.gif", "bt_lm_fr.gif", "bt_lm_grmn.gif", "bt_lm_nwg.gif", or "bt_lm_spn.gif"
*/
var learnMoreButtonFile = "bt_lm_fr.gif";

//SEARCHWORDS
var searchArray = new Array();
searchArray[0] = "Search Word here";
searchArray[1] = "Search Word here";
searchArray[2] = "Search Word here";
searchArray[3] = "Search Word here";
searchArray[4] = "Search Word here";
searchArray[5] = "Search Word here";
searchArray[6] = "Search Word here";

/*
TOOLTIP STYLING
---------------
Variables which allow you to adjust the tooltip background color for the roll-over and roll-off states, the font used for the tooltip, the colors of the title and display URL links for the roll-over and roll-off states and whether or not the links should be underlined at any point.
*/

//tooltip couleur de fond
var tooltipBkgColor = new Array();
tooltipBkgColor[0] = "#EDEDED";
tooltipBkgColor[1] = "#FFFFFF";
tooltipBkgColor[2] = "#EDEDED";
tooltipBkgColor[3] = "#EDEDED";
tooltipBkgColor[4] = "#EDEDED";
tooltipBkgColor[5] = "#EDEDED";
tooltipBkgColor[6] = "#EDEDED";


// couleur de fond au survol
var tooltipHighlightColor = new Array();
tooltipHighlightColor[0] = "#FFFFFF";
tooltipHighlightColor[1] = "#FFFFFF";
tooltipHighlightColor[2] = "#FFFFFF";
tooltipHighlightColor[3] = "#FFFFFF";
tooltipHighlightColor[4] = "#FFFFFF";
tooltipHighlightColor[5] = "#FFFFFF";
tooltipHighlightColor[6] = "#FFFFFF";


var tooltipFont = new Array();
tooltipFont[0] = "Arial, Verdana, Helvetica, sans-serif";
tooltipFont[1] = "Arial, Verdana, Helvetica, sans-serif";
tooltipFont[2] = "Arial, Verdana, Helvetica, sans-serif";
tooltipFont[3] = "Arial, Verdana, Helvetica, sans-serif";
tooltipFont[4] = "Arial, Verdana, Helvetica, sans-serif";
tooltipFont[5] = "Arial, Verdana, Helvetica, sans-serif";
tooltipFont[6] = "Arial, Verdana, Helvetica, sans-serif";


var bottomBkgColor = new Array();
bottomBkgColor[0] = "#ededed";
bottomBkgColor[1] = "#ededed";
bottomBkgColor[2] = "#ededed";
bottomBkgColor[3] = "#FFFFFF";
bottomBkgColor[4] = "#FFFFFF";
bottomBkgColor[5] = "#FFFFFF";
bottomBkgColor[6] = "#FFFFFF";


//title field
var tooltipTitleColorOff = new Array();
tooltipTitleColorOff[0] = "#000099";
tooltipTitleColorOff[1] = "#000099";
tooltipTitleColorOff[2] = "#000099";
tooltipTitleColorOff[3] = "#000099";
tooltipTitleColorOff[4] = "#000099";
tooltipTitleColorOff[5] = "#000099";
tooltipTitleColorOff[6] = "#000099";


var tooltipTitleColorOn = new Array();
tooltipTitleColorOn[0] = "#000099";
tooltipTitleColorOn[1] = "#000099";
tooltipTitleColorOn[2] = "#000099";
tooltipTitleColorOn[3] = "#000099";
tooltipTitleColorOn[4] = "#000099";
tooltipTitleColorOn[5] = "#000099";
tooltipTitleColorOn[6] = "#000099";


var tooltipTitleDecorationOff = new Array();
tooltipTitleDecorationOff[0] = "none";
tooltipTitleDecorationOff[1] = "none";
tooltipTitleDecorationOff[2] = "none";
tooltipTitleDecorationOff[3] = "none";
tooltipTitleDecorationOff[4] = "none";
tooltipTitleDecorationOff[5] = "none";
tooltipTitleDecorationOff[6] = "none";


var tooltipTitleDecorationOn = new Array();
tooltipTitleDecorationOn[0] = "underline";
tooltipTitleDecorationOn[1] = "underline";
tooltipTitleDecorationOn[2] = "underline";
tooltipTitleDecorationOn[3] = "underline";
tooltipTitleDecorationOn[4] = "underline";
tooltipTitleDecorationOn[5] = "underline";
tooltipTitleDecorationOn[6] = "underline";


//visible URL
var tooltipURLColorOff = new Array();
tooltipURLColorOff[0] = "#008000";
tooltipURLColorOff[1] = "#008000";
tooltipURLColorOff[2] = "#008000";
tooltipURLColorOff[3] = "#008000";
tooltipURLColorOff[4] = "#008000";
tooltipURLColorOff[5] = "#008000";
tooltipURLColorOff[6] = "#008000";


var tooltipURLColorOn = new Array();
tooltipURLColorOn[0] = "#008000";
tooltipURLColorOn[1] = "#008000";
tooltipURLColorOn[2] = "#008000";
tooltipURLColorOn[3] = "#008000";
tooltipURLColorOn[4] = "#008000";
tooltipURLColorOn[5] = "#008000";
tooltipURLColorOn[6] = "#008000";


var tooltipURLDecorationOff = new Array();
tooltipURLDecorationOff[0] = "none";
tooltipURLDecorationOff[1] = "none";
tooltipURLDecorationOff[2] = "none";
tooltipURLDecorationOff[3] = "none";
tooltipURLDecorationOff[4] = "none";
tooltipURLDecorationOff[5] = "none";
tooltipURLDecorationOff[6] = "none";


var tooltipURLDecorationOn = new Array();
tooltipURLDecorationOn[0] = "underline";
tooltipURLDecorationOn[1] = "underline";
tooltipURLDecorationOn[2] = "underline";
tooltipURLDecorationOn[3] = "underline";
tooltipURLDecorationOn[4] = "underline";
tooltipURLDecorationOn[5] = "underline";
tooltipURLDecorationOn[6] = "underline";

/*

		==========================
				DEMO CODE
		==========================

*/




//=============================================
//GLOBAL VARIABLES AND CONSTANTS
//=============================================
var hideID = 0;						//setInterval variable used when making the tooltip disappear 
var lastToolNum = 0;				//number that matches the rolled-over keyword and correspond with the user-editable array variables 
var tooltipXOffset = 15;			//default horizontal distance from the top/left of the keyword in which the tooltip will appear
var tooltipYOffset = 10;				//default vertical distance from the top/left of the keyword in which the tooltip will appear
var hasEnlarged = false;			//boolean value indicating the state of an expandable ad unit

//roll-over button image source
var bt_what_on = new Image();
var bt_what_off = new Image();
var bt_close_on = new Image();
var bt_close_off = new Image();
bt_what_on.src = "http://www.sernavision.com/dm_popup/bt_what_on.gif";
bt_what_off.src = "http://www.sernavision.com/dm_popup/bt_what_off.gif";
bt_close_on.src = "http://www.sernavision.com/dm_popup/bt_close_on.gif";
bt_close_off.src = "http://www.sernavision.com/dm_popup/bt_close_off.gif";




//=============================================
//FUNCTIONS
//=============================================

function goSearch () {
	window.open ("http://www.google.fr");
}


//TEMP:
function cAT(){};function hlA(x){};function ttL(x){};function llA(x){};function kwC(x,y,z,a){};function kwM(x){};function ttH(x){};function MDn(x){};function MUp(x){};


//Button roll-over functions
function turnImgOn(imgName) {
	imgOn = eval(imgName +"_on.src");document [imgName].src = imgOn;
}
function turnImgOff(imgName) {
	imgOff = eval(imgName + "_off.src");document [imgName].src = imgOff;
}


//DHTML style and property change functions
function changeStyle(objectID, propertyName, propertyValue){
	document.getElementById(objectID).style[propertyName] = propertyValue;
}
function changeProperty(objectID, propertyName, propertyValue){
	document.getElementById(objectID)[propertyName] = propertyValue;
}
function getStyleValue(objectID, propertyName){
	return document.getElementById(objectID).style[propertyName];
}
function getPropertyValue(objectID, propertyName){
	return document.getElementById(objectID)[propertyName];
}

function displayStatus(string){
	window.status = string;
	return true;
}

function clearStatus(){
	window.status = '';
	return true;
}

function getRealPos(ele,dir)
{
	(dir=="x") ? pos = ele.offsetLeft : pos = ele.offsetTop;
	tempEle = ele.offsetParent;
	while(tempEle != null)
	{
		pos += (dir=="x") ? tempEle.offsetLeft : tempEle.offsetTop;
		tempEle = tempEle.offsetParent;
	}
	return pos;
}

function getScrollY(){
	if(window.pageYOffset != null) {
		return window.pageYOffset;
	} else {
		return document.body.scrollTop;
	}
}

function getScrollX(){
	if(window.pageXOffset != null){
		return window.pageXOffset;
	} else {
		return document.body.scrollLeft;
	}
}

function adDelay(){
	//close box
	changeStyle('tooltipBox', 'visibility', 'hidden');
	//clear ID
	clearInterval(hideID);
	//clear status message
	displayStatus(' ');
	//clear ad content to turn off possible flash audio
	changeProperty('tooltipBox', 'innerHTML', "");
}

function clearAdInterval(){
	clearInterval(hideID);
}

function hideAd(){
	if(whichDrag == ""){
		clearInterval(hideID);
		hideID = setInterval(adDelay, 1250);
	
		//THIN DOUBLE UNDERLINE
		linkRefString = "link" + lastToolNum;
		changeStyle(linkRefString, 'borderBottomWidth', '1px');
	}
	//TURN OFF AUDIO
	turnSoundOff();
}

function linkClick(indexNum){
	window.open(urlArray[indexNum]);
	fClick("close");
}

function tooltipClick(){
	window.open(urlArray[lastToolNum]);
	fClick("close");
}

function fClick(arg1){
	adDelay();
	clearAdInterval();
}

function fReady(){
	alert('fReady() has fired');
}

function turnSoundOff(){
	try {
		window.document.myFlashMovie.SetVariable("jsAudioAdjust", "AUDIO_OFF");
	} catch(err) {
	}
}
function turnSoundOn(){
	try {
		window.document.myFlashMovie.SetVariable("jsAudioAdjust", "AUDIO_ON");
	} catch(err) {
	}
}

function highlightAd(tooltipRef, idString){
	//TURN ON AUDIO
	turnSoundOn();
	
	//Flash MPU Expandable
	if(styleArray[lastToolNum] == 21){
		if(!hasEnlarged){
			hasEnlarged = true;
			document.getElementById('myFlashMovie').style["width"] = maxCreativeWidth[lastToolNum];
			document.getElementById('myFlashMovie').style["height"] = maxCreativeHeight[lastToolNum];
			//extend width of tooltip drag handle porportionally
			document.getElementById('handle').style["width"] = parseInt(document.getElementById('handle').style["width"]) + (maxCreativeWidth[lastToolNum]-creativeWidth[lastToolNum]);
			document.getElementById('handleImage').style["width"] = parseInt(document.getElementById('handle').style["width"]);
		}
	}
	
	//change bkg color on rollover if needed
	if(styleArray[lastToolNum]<20){	
		for(var x=1;x<7;x++){
			var tempID = "cZn" + x;
			document.getElementById(tempID).style.background = tooltipHighlightColor[lastToolNum];
		}
	}
	
	//if widescreen unit, enlarge flash
	if(styleArray[lastToolNum] == 6){
		if(!hasEnlarged){
			hasEnlarged = true;
			maximizeFlash();
		}
	}

}

function unHighlightAd(tooltipRef, idString){
	//TURN OFF AUDIO
	turnSoundOff();
	
	//change bkg color if needed
	if(styleArray[lastToolNum]<20){
		for(var x=1;x<7;x++){
			var tempID = "cZn" + x;
			//document.getElementById(tempID).style.background = tooltipBkgColor[lastToolNum]; mise en rem provoque une erreur
		}
	}
}

function animatePop(){
	//move entire tooltip
	slide('tooltipBox',document.getElementById('tooltipBox').offsetLeft,document.getElementById('tooltipBox').offsetLeft - 10,document.getElementById('tooltipBox').offsetTop,document.getElementById('tooltipBox').offsetTop-10,.2);
	//slide down shadow
	slide('ttShadow',document.getElementById('ttShadow').offsetLeft,document.getElementById('ttShadow').offsetLeft + 10,document.getElementById('ttShadow').offsetTop,document.getElementById('ttShadow').offsetTop + 10,.2);
}


// --------------------------------------------------
// HTML EXPANDABLE ROUTINES
// --------------------------------------------------
function grow(objectName,startW,endW,startH,endH,growTime){
	var objectRef = document.getElementById(objectName);
	
	if(typeof objectRef.growID== "number")clearInterval(objectRef.growID);
	var time = growTime*1000;//duration of the blend in miliseconds
	var steps = 30*growTime;//steps in the animation (should be framerate*("var time" in seconds))
	var growWArray = new Array();
	var growHArray = new Array();
	
	//calculate changes in x and y coordinates
	var growDeltaW = (endW - startW)/steps;
	var growDeltaH = (endH - startH)/steps;
	for(x=0; x<=steps; x++){
		growWArray.push(Math.round(startW + (x * growDeltaW)));
		growHArray.push(Math.round(startH + (x * growDeltaH)));
	}
	
	//animate grow using an inner function
	objectRef.growStep = 0;
	objectRef.nameString = objectName;
	var growInterval = time/steps;
	objectRef.growID = setInterval(growFunction,growInterval);
	var selfReference = objectRef;
	function growFunction(){
		selfReference.growStep++;
		if(selfReference.growStep <= steps){
			//resize object
			var tempW = growWArray[selfReference.growStep] + "px";
			var tempH = growHArray[selfReference.growStep] + "px";
			changeStyle(selfReference.nameString, 'width', tempW);
			changeStyle(selfReference.nameString, 'height', tempH);
		} else {
			//account for remainder in case "step" is not a whole-number value
			var tempW = endW + "px";
			var tempH = endH + "px";
			changeStyle(selfReference.nameString, 'width', tempW);
			changeStyle(selfReference.nameString, 'height', tempH);
			clearInterval(selfReference.growID);
		}
	}
};
function killGrow(objectName){
	var objectRef = document.getElementById(objectName);
	if(typeof objectRef.growID == "number")clearInterval(objectRef.growID);
};

function slide(objectName,startX,endX,startY,endY,slideTime){
	var objectRef = document.getElementById(objectName);
	
	if(typeof objectRef.slideID== "number")clearInterval(objectRef.slideID);
	var time = slideTime*1000;//duration of the blend in miliseconds
	var steps = 30*slideTime;//steps in the animation (should be framerate*("var time" in seconds))
	var slideXArray = new Array();
	var slideYArray = new Array();
	
	//calculate changes in x and y coordinates
	var slideDeltaX = (endX - startX)/steps;
	var slideDeltaY = (endY - startY)/steps;
	for(x=0; x<=steps; x++){
		slideXArray.push(Math.round(startX + (x * slideDeltaX)));
		slideYArray.push(Math.round(startY + (x * slideDeltaY)));
	}
	
	//animate grow using an inner function
	objectRef.slideStep = 0;
	objectRef.nameString = objectName;
	var slideInterval = time/steps;
	objectRef.slideID = setInterval(slideFunction,slideInterval);
	var selfReference = objectRef;
	function slideFunction(){
		selfReference.slideStep++;
		if(selfReference.slideStep <= steps){
			//resize object
			var tempX = slideXArray[selfReference.slideStep] + "px";
			var tempY = slideYArray[selfReference.slideStep] + "px";
			changeStyle(selfReference.nameString, 'left', tempX);
			changeStyle(selfReference.nameString, 'top', tempY);
		} else {
			//account for remainder in case "step" is not a whole-number value
			var tempX = endX + "px";
			var tempY = endY + "px";
			changeStyle(selfReference.nameString, 'left', tempX);
			changeStyle(selfReference.nameString, 'top', tempY);
			clearInterval(selfReference.slideID);
		}
	}
};
function killSlide(objectName){
	var objectRef = document.getElementById(objectName);
	if(typeof objectRef.slideID == "number")clearInterval(objectRef.slideID);
};

function maximizeFlash(){
	//make tooltip grow only if myFlashMovie exists/ flash has been detected.
	if(document.getElementById('myFlashMovie') != null) {
		killGrow('myFlashMovie');
		killGrow('placeholderDiv');
		killGrow('ttShadow');
		killGrow('ttShadowImage');
		killGrow('tooltipBox');
		killGrow('itt_table');
		var fW1 = creativeWidth[lastToolNum];//document.getElementById('myFlashMovie').offsetWidth;
		var fW2 = maxCreativeWidth[lastToolNum];
		var fH1 = creativeHeight[lastToolNum];//document.getElementById('myFlashMovie').offsetHeight;
		var fH2 = maxCreativeHeight[lastToolNum];
		var flashBottomPad = 0;
		var shadowWidth = 10;
		var fHorMargin = 15;
		var fVertMargin = 55;
		var ttOvergrowth = (fW2+fHorMargin) - document.getElementById('itt_table').offsetWidth;
		
		//ANIMATE TOOLTIP ELEMENTS
		grow('myFlashMovie', fW1, fW2, fH1, fH2, .2);
		grow('placeholderDiv', document.getElementById('placeholderDiv').offsetWidth, fW1 + ttOvergrowth, document.getElementById('placeholderDiv').offsetHeight, fH2, .2);
		grow('ttShadow', document.getElementById('ttShadow').offsetWidth, (fW2 + fHorMargin), document.getElementById('ttShadow').offsetHeight, (fH2 + fVertMargin), .2);
		grow('ttShadowImage', document.getElementById('ttShadowImage').offsetWidth, (fW2 + fHorMargin), document.getElementById('ttShadowImage').offsetHeight, (fH2 + fVertMargin), .2);
		grow('tooltipBox', document.getElementById('tooltipBox').offsetWidth, (fW2 + fHorMargin + shadowWidth), document.getElementById('tooltipBox').offsetHeight, document.getElementById('tooltipBox').offsetHeight, .2);
		grow('itt_table', document.getElementById('itt_table').offsetWidth, (fW2 + fHorMargin), document.getElementById('itt_table').offsetHeight, document.getElementById('itt_table').offsetHeight, .2);

	}
}

// --------------------------------------------------


// --------------------------------------------------
//DRAGGABLE TOOLTIP ROUTINES
// --------------------------------------------------
document.onmousemove = mouseMove;
document.onmouseup   = mouseUp;
document.onmousedown   = mousedownCheck;

var dragObject  = null;
var mouseOffset = null;
var mouseIsDown = false;
var whichDrag = ""

function mousedownCheck(){
	mouseIsDown = true;
}

function getMouseOffset(target, ev){
	ev = ev || window.event;

	var docPos = getPosition(target);
	var mousePos = mouseCoords(ev);
	return {x:mousePos.x - docPos.x, y:mousePos.y - docPos.y};
}

function getPosition(e){
	var left = 0;
	var top  = 0;

	while (e.offsetParent){
		left += e.offsetLeft;
		top  += e.offsetTop;
		e = e.offsetParent;
	}

	left += e.offsetLeft;
	top  += e.offsetTop;

	return {x:left, y:top};
}

function mouseMove(ev){
	ev = ev || window.event;

	if(mouseIsDown){
		if(dragObject){
			var mousePos = mouseCoords(ev);
			whichDrag = dragObject;
			//dragObject.style.position = 'absolute';
			dragObject.style.top = mousePos.y - mouseOffset.y;
			dragObject.style.left = mousePos.x - mouseOffset.x;
	
			return false;
		}
	}

}

function mouseCoords(ev){
	if(ev.pageX || ev.pageY){
		return {x:ev.pageX, y:ev.pageY};
	}
	return {
		x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,
		y:ev.clientY + document.body.scrollTop  - document.body.clientTop
	};
}

function makeClickable(object){
	object.onmousedown = function(){
		dragObject = this;
	}
}

function mouseUp(){
	mouseIsDown = false;
	dragObject = null;
}

var makeDragInit = false;
function makeDraggable(item, handle){
	if(!item) return;
	handle.onmousedown = function(ev){
		dragObject  = item;
		mouseOffset = getMouseOffset(item, ev);
		return false;
	}
}
// --------------------------------------------------


function displayAd(indexNum){
	//global variable adjustments
	lastToolNum = indexNum;				//sets the number of lastToolNum to match the current unit
	hasEnlarged = false;				//resets state of expandable unit
	whichDrag = "";						//resets which tooltip is being dragged
	
	//unit width override based on layout
	//brandbox
	if(styleArray[lastToolNum]==3){
		adUnitWidth[lastToolNum] = 330;
	}
	//HTML widescreen
	if(styleArray[lastToolNum]==6){
		adUnitWidth[lastToolNum] = 325;
	}
	//billboard
	if(styleArray[lastToolNum]==4){
		adUnitWidth[lastToolNum] = 250;
	}
	//freeform or iframe (shrink to fit creative, no border)
	if(styleArray[lastToolNum]==5 || styleArray[lastToolNum]==7){
		adUnitWidth[lastToolNum] = creativeWidth[lastToolNum] + 12;
		adUnitHeight[lastToolNum] = creativeHeight[lastToolNum] + 27;
	}
	
	//local variables
	var linkRefString = "link" + indexNum;
	var linkRef =  document.getElementById(linkRefString);
	var boxWidth = adUnitWidth[lastToolNum] - 10;
	var boxHeight = adUnitHeight[lastToolNum] - 10;
	var contentTableHeight = boxHeight - 27;
	var handleWidth = adUnitWidth[lastToolNum]-150;
	var isFlash = (creativeArray[lastToolNum].toLowerCase().indexOf(".swf")!= -1 && styleArray[lastToolNum] > 1) ? true : false;

	//clear hide delay 
	clearInterval(hideID);	

	//COMPOSE TIP
	var displayString = '';
	
	if(styleArray[lastToolNum]>=20){
		//-------------------------
		//	ALL-FLASH LAYOUTS
		//-------------------------
		
		//	_________________________________
		//
		//	All-Flash Standard
		//	_________________________________
		displayString += '<div class="DMTooltip" id="creativeContent">'
		displayString += 	'<span style="background-color:#FFFF00;font-family:' + tooltipFont[lastToolNum] + ';font-size:10px;">[Flash was not detected]</span>'
		displayString += '</div>'
		displayString += '<div id="handle" style="overflow:hidden;width:107px;height:21px;position:absolute;z-index:5011;left:145px;top:0px;cursor:move;"><img id="handleImage" src="http://www.sernavision.com/spacer.gif" border="0" width="107" height="21"></div>'
	
	} else {		
		//-------------------------
		//	HTML LAYOUTS
		//-------------------------
		// ** Top half of tooltip
		//displayString += '	<div id="tooltipbox" class="DMTooltip" onMouseOver="cAT();giF=0;hlA(\'itt_table\');" onMouseOut="ttL(0);llA(\'itt_table\');" style="border:none;z-index:9999;cursor:pointer;font-family:' + tooltipFont[lastToolNum] + ';width:' + adUnitWidth[lastToolNum] + 'px;height:' + adUnitHeight[lastToolNum] + 'px;">'	
		displayString += '	<div id="tooltipBoxInside" class="DMTooltip" onMouseOver="cAT();giF=0;hlA(\'itt_table\');" onMouseOut="ttL(0);llA(\'itt_table\');" style="border:none;z-index:9999;cursor:pointer;font-family:' + tooltipFont[lastToolNum] + ';">'
		displayString += '	<div id="ttShadow" class="DMTooltip" style="position:absolute;z-index:-1;left:0px;top:0px;width:' + boxWidth + 'px;height:' + boxHeight + 'px;display:inline-block;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'http://www.sernavision.com/dm_popup/sh_305x200.png\',sizingMethod=\'scale\');"><img id="ttShadowImage" src="http://www.sernavision.com/dm_popup/sh_305x200.png" width="' + boxWidth + '" height="' + boxHeight + '" style="filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);"></div>'
		displayString += '	<table id="itt_table" name="itt_table" class="DMTooltip" style="border:none;background-color:transparent;margin:0px 0px;table-layout:auto;border-style:none;cursor:pointer;width:' + boxWidth + 'px;" cellpadding="0" cellspacing="0" border="0">'
		displayString += '		<tr onMouseDown="MDn(event);" onMouseUp="MUp(event);" style="padding:0px 0px;border:none;background-color:transparent;line-height:normal;">'
		displayString += '			<td style="padding:0px 0px;border:none;background-color:transparent;line-height:normal;" onClick="tooltipClick();">'
		displayString += '				<b style="font-size:1px;display:block;height:1px;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;background:#545454;margin:0px 6px;"></b>'
		displayString += '				<b style="font-size:1px;display:block;height:1px;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;background:#CACACA;margin:0px 4px;border-width:0px 2px;"></b>'
		displayString += '				<b style="font-size:1px;display:block;height:1px;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;background:#F6F6F6;margin:0px 2px;border-width:0px 2px;"></b>'
		displayString += '				<b style="font-size:1px;display:block;height:1px;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;background:#E8E8E8;margin:0px 2px;"></b>'
		displayString += '				<b style="font-size:1px;display:block;height:1px;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;background:#E0E0E0;margin:0px 1px;"></b>'
		displayString += '				<b style="font-size:1px;display:block;height:1px;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;background:#DBDBDB;margin:0px 1px;"></b>'
		displayString += '				<b style="font-size:1px;display:block;height:1px;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;background:#D9D9D9;margin:0px 0px;"></b>'
		displayString += '				<b style="font-size:1px;display:block;height:1px;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;background:#D7D7D7;margin:0px 0px;"></b>'
		displayString += '				<b style="font-size:1px;display:block;height:1px;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;background:#D7D7D7;margin:0px 0px;"></b>'
		displayString += '				<b style="font-size:1px;display:block;height:1px;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;background:#D8D8D8;margin:0px 0px;"></b>'
		displayString += '				<b style="font-size:1px;display:block;height:1px;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;background:#CFCFCF;margin:0px 0px;"></b>'
		displayString += '				<b style="font-size:1px;display:block;height:1px;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;background:#B2B2B2;margin:0px 0px;"></b>'
		displayString += '				<b style="font-size:1px;display:block;height:1px;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;background:#B5B5B5;margin:0px 0px;"></b>'
		displayString += '				<b style="font-size:1px;display:block;height:1px;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;background:#B9B9B8;margin:0px 0px;"></b>'
		displayString += '				<b style="font-size:1px;display:block;height:1px;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;background:#BFBFBB;margin:0px 0px;"></b>'
		displayString += '				<b style="font-size:1px;display:block;height:1px;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;background:#C5C5BF;margin:0px 0px;"></b>'
		displayString += '				<b style="font-size:1px;display:block;height:1px;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;background:#CBCBC2;margin:0px 0px;"></b>'
		displayString += '				<b style="font-size:1px;display:block;height:1px;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;background:#D2D2C4;margin:0px 0px;"></b>'
		displayString += '				<b style="font-size:1px;display:block;height:1px;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;background:#D8D8C7;margin:0px 0px;"></b>'
		displayString += '				<b style="font-size:1px;display:block;height:1px;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;background:#DBDBC8;margin:0px 0px;"></b>'
		displayString += '				<b style="font-size:1px;display:block;height:1px;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;background:#AAAAA8;margin:0px 0px;"></b>'
		displayString += '			</td>'
		displayString += '		</tr>'
		displayString += '		<tr style="padding:0px 0px;border:none;background-color:transparent;line-height:normal;">'
		displayString += '			<td id="cZn1" name="cZn1" style="margin:0px;border-left:1px solid #545454;border-right:1px solid #545454;line-height:normal;background:' + tooltipBkgColor[lastToolNum] + ';border-bottom:none;text-align:left;padding:0px;">'
		
	
		
		
		switch(true){
			case(styleArray[lastToolNum]==2):
			//	_________________________________
			//
			//	Small Logo Layout
			//	_________________________________
				displayString += '				<table cellpadding="0" cellspacing="0" border="0" style="height:' + contentTableHeight + 'px;border:none;margin:0px 0px;table-layout:auto;position:relative;width:100%;">'
					
				//title
				displayString += '					<tr style="padding:0px 0px;border:none;background-color:transparent;line-height:normal;" valign="top" onClick="kwC(0,11,event,0);" oncontextmenu="return false;" onMouseOver="kwM(1495917);" onMouseMove="kwM(1495917);">'
				displayString += '						<td style="vertical-align:top;padding:3px 3px 0px 7px;height:10px;" onClick="tooltipClick();" align="left">'
				displayString += '							<span style="padding:0px 0px;line-height:normal;font-family:' + tooltipFont[lastToolNum] + ';background-color:transparent;text-decoration:' + tooltipTitleDecorationOff[lastToolNum] + ';font-size:12px;font-weight:bold;color:' + tooltipTitleColorOff[lastToolNum] + ';" onMouseOver="this.style.textDecoration=\'' + tooltipTitleDecorationOn[lastToolNum] + '\';this.style.color=\'' + tooltipTitleColorOn[lastToolNum] + '\';" onMouseOut="this.style.textDecoration=\'' + tooltipTitleDecorationOff[lastToolNum] + '\';this.style.color=\'' + tooltipTitleColorOff[lastToolNum] + '\';">' + titleArray[lastToolNum] + '</span><br><span style="line-height:7px;display:block;">&nbsp;</span>'
				
				displayString += '							<span style="padding:0px 0px;line-height:normal;font-family:' + tooltipFont[lastToolNum] + ';background-color:transparent;text-decoration:none;font-size:11px;font-weight:normal;color:#000000;text-align:left;"><div id="creativeContent"><img style="margin-top:3px;margin-bottom:3px;margin-left:7px;margin-right:4px;" src="' + creativeArray[lastToolNum] + '" width="' + creativeWidth[lastToolNum] + '" height="' + creativeHeight[lastToolNum] + '" align="right">' + bodyArray[lastToolNum] + '</div></span>'
				displayString += '						</td>'
				displayString += '					</tr>'
	
				//visible url
				displayString += '					<tr style="padding:0px 0px;border:none;background-color:transparent;line-height:normal;" valign="top" onClick="kwC(0,11,event,0);" oncontextmenu="return false;" onMouseOver="kwM(1495917);" onMouseMove="kwM(1495917);">'
				displayString += '						<td style="padding:1px 3px 2px 7px;border:none;background-color:transparent;line-height:normal;height:10px;" onClick="tooltipClick();" colspan="2" valign="bottom" align="left"><span style="padding:0px 0px;line-height:11px;font-family:' + tooltipFont[lastToolNum] + ';background-color:transparent;text-decoration:none;font-size:11px;font-weight:normal;color:' + tooltipURLColorOff[lastToolNum] + ';" onMouseOver="this.style.textDecoration=\'' + tooltipURLDecorationOn[lastToolNum] + '\';this.style.color=\'' + tooltipURLColorOn[lastToolNum] + '\';" onMouseOut="this.style.textDecoration=\'' + tooltipURLDecorationOff[lastToolNum] + '\';this.style.color=\'' + tooltipURLColorOff[lastToolNum] + '\';" onClick="return false;">' + linkArray[lastToolNum] + '</span></td>'
				displayString += '					</tr>'
				displayString += '				</table>'
				break;
				
			case(styleArray[lastToolNum]==3):
			//	_________________________________
			//
			//	Brandbox Layout
			//	_________________________________
				displayString += '				<table cellpadding="0" cellspacing="0" border="0" style="height:' + contentTableHeight + 'px;border:none;margin:0px 0px;table-layout:auto;position:relative;width:100%;">'
				
				//title and body copy
				displayString += '					<tr>'
				displayString += '						<td style="vertical-align:top;padding:3px 7px 3px 7px;" onClick="tooltipClick();" align="left">'
				displayString += '							<span style="padding:0px 0px;line-height:normal;font-family:' + tooltipFont[lastToolNum] + ';background-color:transparent;text-decoration:' + tooltipTitleDecorationOff[lastToolNum] + ';font-size:12px;font-weight:bold;color:' + tooltipTitleColorOff[lastToolNum] + ';" onMouseOver="this.style.textDecoration=\'' + tooltipTitleDecorationOn[lastToolNum] + '\';this.style.color=\'' + tooltipTitleColorOn[lastToolNum] + '\';" onMouseOut="this.style.textDecoration=\'' + tooltipTitleDecorationOff[lastToolNum] + '\';this.style.color=\'' + tooltipTitleColorOff[lastToolNum] + '\';">' + titleArray[lastToolNum] + '</span><br>'
				displayString += '							<span style="padding:0px 0px;line-height:normal;font-family:' + tooltipFont[lastToolNum] + ';background-color:transparent;text-decoration:none;font-size:11px;font-weight:normal;color:#000000;">' + bodyArray[lastToolNum] + '</span>'
				displayString += '						</td>'
				displayString += '						<td style="vertical-align:top;padding:6px 7px 3px 7px;text-align:right;">'
				displayString += '							<div id="creativeContent" align="right"><img onClick="tooltipClick();" src="' + creativeArray[lastToolNum] + '" width="' + creativeWidth[lastToolNum] + '" height="' + creativeHeight[lastToolNum] + '"></div>'
				displayString += '						</td>'
				displayString += '					</tr>'
	
				//visible url
				displayString += '					<tr style="padding:0px 0px;border:none;background-color:transparent;line-height:normal;" valign="top" onClick="kwC(0,11,event,0);" oncontextmenu="return false;" onMouseOver="kwM(1495917);" onMouseMove="kwM(1495917);">'
				displayString += '						<td colspan="2" style="padding:1px 3px 2px 7px;border:none;background-color:transparent;line-height:normal;height:10px;" onClick="tooltipClick();" colspan="2" valign="top" align="left"><span style="padding:0px 0px;line-height:11px;font-family:' + tooltipFont[lastToolNum] + ';background-color:transparent;text-decoration:none;font-size:11px;font-weight:normal;color:' + tooltipURLColorOff[lastToolNum] + ';" onMouseOver="this.style.textDecoration=\'' + tooltipURLDecorationOn[lastToolNum] + '\';this.style.color=\'' + tooltipURLColorOn[lastToolNum] + '\';" onMouseOut="this.style.textDecoration=\'' + tooltipURLDecorationOff[lastToolNum] + '\';this.style.color=\'' + tooltipURLColorOff[lastToolNum] + '\';" onClick="return false;">' + linkArray[lastToolNum] + '</span></td>'
				displayString += '					</tr>'
				displayString += '				</table>'
				break;
				
			case(styleArray[lastToolNum]==4):
			//	_________________________________
			//
			//	Billboard Layout
			//	_________________________________
				displayString += '				<table cellpadding="0" cellspacing="0" border="0" style="height:' + contentTableHeight + 'px;border:none;margin:0px 0px;table-layout:auto;position:relative;width:100%;">'
					
				//creative
				displayString += '					<tr>'
				displayString += '						<td style="vertical-align:top;padding:3px 3px 3px 7px;" onClick="tooltipClick();" align="center">'
				displayString += '							<div id="creativeContent"><img style="margin-top:3px;margin-bottom:0px;margin-left:0px;margin-right:4px;" src="' + creativeArray[lastToolNum] + '" width="' + creativeWidth[lastToolNum] + '" height="' + creativeHeight[lastToolNum] + '"></div>'
				displayString += '						</td>'
				displayString += '					</tr>'
				
				//title
				displayString += '					<tr style="padding:0px 0px;border:none;background-color:transparent;line-height:normal;" valign="top" onClick="kwC(0,11,event,0);" oncontextmenu="return false;" onMouseOver="kwM(1495917);" onMouseMove="kwM(1495917);">'
				displayString += '						<td style="vertical-align:top;padding:0px 3px 0px 7px;height:10px;" onClick="tooltipClick();" align="left">'
				displayString += '							<span style="padding:0px 0px;line-height:normal;font-family:' + tooltipFont[lastToolNum] + ';background-color:transparent;text-decoration:' + tooltipTitleDecorationOff[lastToolNum] + ';font-size:12px;font-weight:bold;color:' + tooltipTitleColorOff[lastToolNum] + ';" onMouseOver="this.style.textDecoration=\'' + tooltipTitleDecorationOn[lastToolNum] + '\';this.style.color=\'' + tooltipTitleColorOn[lastToolNum] + '\';" onMouseOut="this.style.textDecoration=\'' + tooltipTitleDecorationOff[lastToolNum] + '\';this.style.color=\'' + tooltipTitleColorOff[lastToolNum] + '\';">' + titleArray[lastToolNum] + '</span>'
				displayString += '						</td>'
				displayString += '					</tr>'
				
				//body copy
				displayString += '					<tr>'
				displayString += '						<td style="vertical-align:top;padding:3px 3px 3px 7px;" onClick="tooltipClick();" align="left">'
				displayString += '							<span style="padding:0px 0px;line-height:normal;font-family:' + tooltipFont[lastToolNum] + ';background-color:transparent;text-decoration:none;font-size:11px;font-weight:normal;color:#000000;">' + bodyArray[lastToolNum] + '</span>'
				displayString += '						</td>'
				displayString += '					</tr>'
	
				//visible url
				displayString += '					<tr style="padding:0px 0px;border:none;background-color:transparent;line-height:normal;" valign="top" onClick="kwC(0,11,event,0);" oncontextmenu="return false;" onMouseOver="kwM(1495917);" onMouseMove="kwM(1495917);">'
				displayString += '						<td style="padding:3px 3px 2px 7px;border:none;background-color:transparent;line-height:normal;height:10px;" onClick="tooltipClick();" colspan="2" valign="top" align="left"><span style="padding:0px 0px;line-height:11px;font-family:' + tooltipFont[lastToolNum] + ';background-color:transparent;text-decoration:none;font-size:11px;font-weight:normal;color:' + tooltipURLColorOff[lastToolNum] + ';" onMouseOver="this.style.textDecoration=\'' + tooltipURLDecorationOn[lastToolNum] + '\';this.style.color=\'' + tooltipURLColorOn[lastToolNum] + '\';" onMouseOut="this.style.textDecoration=\'' + tooltipURLDecorationOff[lastToolNum] + '\';this.style.color=\'' + tooltipURLColorOff[lastToolNum] + '\';" onClick="return false;">' + linkArray[lastToolNum] + '</span></td>'
				displayString += '					</tr>'
				displayString += '				</table>'
				break;
				
			
			case(styleArray[lastToolNum]==5):
			//	_________________________________
			//
			//	Freeform
			//	_________________________________
				displayString += '<table cellpadding="0" cellspacing="0" border="0" style="height:' + contentTableHeight + 'px;border:none;margin:0px 0px;table-layout:auto;position:relative;width:100%;">'
					
				//creative
				displayString += '<tr>'
				displayString += '<td style="vertical-align:top;padding:0px;margin:0px;" onClick="tooltipClick();" align="center">'
				displayString += '<div id="creativeContent"><img style="margin-top:0px;margin:0px;" src="' + creativeArray[lastToolNum] + '" width="' + creativeWidth[lastToolNum] + '" height="' + creativeHeight[lastToolNum] + '"></div>'
				displayString += '</td>'
				displayString += '</tr>'
				
				displayString += '</table>'
				break;
				
				
			case(styleArray[lastToolNum]==6):
			//	_________________________________
			//
			//	HTML Expandable/ Widescreen
			//	_________________________________
				displayString += '				<table cellpadding="0" cellspacing="0" border="0" style="height:' + contentTableHeight + 'px;border:none;margin:0px 0px;table-layout:auto;position:relative;width:100%;">'

				//title, body copy, placeholder
				displayString += '					<tr>'
				displayString += '						<td style="vertical-align:top;padding:3px 3px 3px 7px;" onClick="tooltipClick();" align="left">'
				displayString += '							<span style="padding:0px 0px;line-height:normal;font-family:' + tooltipFont[lastToolNum] + ';background-color:transparent;text-decoration:' + tooltipTitleDecorationOff[lastToolNum] + ';font-size:12px;font-weight:bold;color:' + tooltipTitleColorOff[lastToolNum] + ';" onMouseOver="this.style.textDecoration=\'' + tooltipTitleDecorationOn[lastToolNum] + '\';this.style.color=\'' + tooltipTitleColorOn[lastToolNum] + '\';" onMouseOut="this.style.textDecoration=\'' + tooltipTitleDecorationOff[lastToolNum] + '\';this.style.color=\'' + tooltipTitleColorOff[lastToolNum] + '\';">' + titleArray[lastToolNum] + '</span><span style="display:block;margin-top:4px;line-height:normal;font-family:' + tooltipFont[lastToolNum] + ';background-color:transparent;text-decoration:none;font-size:11px;font-weight:normal;color:#000000;">' + bodyArray[lastToolNum] + '</span></div>'
				displayString += '						</td>'
				displayString += '						<td align="right" style="padding-left:7px;padding-right:7px;padding-top:7px;padding-bottom:2px;vertical-align:top;">'
				displayString += '							<div id="placeholderDiv" class="DMTooltip" style="width:' + creativeWidth[lastToolNum] + 'px;height:' + creativeHeight[lastToolNum] + 'px;font-size:0px;"></div>'
				displayString += '						</td>'
				displayString += '					</tr>'
	
				//visible url
				displayString += '					<tr style="padding:0px 0px;border:none;background-color:transparent;line-height:normal;" valign="top" onClick="kwC(0,11,event,0);" oncontextmenu="return false;" onMouseOver="kwM(1495917);" onMouseMove="kwM(1495917);">'
				displayString += '						<td colspan="2" style="padding:1px 3px 2px 7px;border:none;background-color:transparent;line-height:normal;height:10px;" onClick="tooltipClick();" colspan="2" valign="top" align="left"><span style="padding:0px 0px;line-height:11px;font-family:' + tooltipFont[lastToolNum] + ';background-color:transparent;text-decoration:none;font-size:11px;font-weight:normal;color:' + tooltipURLColorOff[lastToolNum] + ';" onMouseOver="this.style.textDecoration=\'' + tooltipURLDecorationOn[lastToolNum] + '\';this.style.color=\'' + tooltipURLColorOn[lastToolNum] + '\';" onMouseOut="this.style.textDecoration=\'' + tooltipURLDecorationOff[lastToolNum] + '\';this.style.color=\'' + tooltipURLColorOff[lastToolNum] + '\';" onClick="return false;">' + linkArray[lastToolNum] + '</span></td>'
				displayString += '					</tr>'
				displayString += '				</table>'
				break;
				
				
			case(styleArray[lastToolNum]==7):
			//	_________________________________
			//
			//	IFRAME
			//	_________________________________
				displayString += '<table cellpadding="0" cellspacing="0" border="0" style="height:' + contentTableHeight + 'px;border:none;margin:0px 0px;table-layout:auto;position:relative;width:100%;">'
					
				//creative
				displayString += '<tr>'
				displayString += '<td style="vertical-align:top;padding:0px;margin:0px;" onClick="tooltipClick();" align="center">'
				displayString += '<div id="creativeContent"><iframe style="margin-top:0px;margin:0px;" src="' + creativeArray[lastToolNum] + '" width="' + creativeWidth[lastToolNum] + '" height="' + creativeHeight[lastToolNum] + '" frameborder="0" scrolling="no" onMouseOver="clearAdInterval();inIframe=true;" onMouseOut="inIframe=false;"></iframe></div>'
				displayString += '</td>'
				displayString += '</tr>'
				
				displayString += '</table>'
				break;
				
			
			case(styleArray[lastToolNum]==8):
			//	_________________________________
			//	_________________________________
			//
			//	Site Results
			//	_________________________________
				displayString += 							'<table cellpadding="0" cellspacing="0" border="0" style="margin:10px 0px 10px 10px;table-layout:auto;position:relative;width:95%;">'
				for(var i=0; i<articleTitle[lastToolNum].length; i++){
				displayString +=								'<tr>';
				displayString +=									'<td valign="top" style="padding-top:10px;"><img src="http://www.sernavision.com/linkarrow.gif" border="0">'
				displayString +=									'</td>'
				displayString +=									'<td valign="top" class="DMTooltip" style="padding-left:5px;padding-top:10px;padding-bottom:0px;padding-right:7px;font-weight:normal;font-size:10px;font-weight:normal;font-family:' + tooltipFont[lastToolNum] + ';"><a title="' + articleSummary[lastToolNum][i] + '" href="' + articleLink[lastToolNum][i] + '" onMouseOver="this.style.textDecoration=\'' + tooltipTitleDecorationOn[lastToolNum] + '\';this.style.color=\'' + tooltipTitleColorOn[lastToolNum] + '\';" onMouseOut="this.style.textDecoration=\'' + tooltipTitleDecorationOff[lastToolNum] + '\';this.style.color=\'' + tooltipTitleColorOff[lastToolNum] + '\';" style="font-size:11px;display:block;font-family:' + tooltipFont[lastToolNum] + ';color:' + tooltipTitleColorOff[lastToolNum] + ';text-decoration:' + tooltipTitleDecorationOff[lastToolNum] + ';font-weight:normal;">' + articleTitle[lastToolNum][i] + '</a>';				
				displayString +=								'</td></tr>';
			}
				displayString += '</table>'
				displayString +=	'<tr>';
				displayString +=		'<td class="DMTooltip" style="display:block; background:' + bottomBkgColor[lastToolNum] + '; border-left:1px solid #000000; border-right:1px solid #000000;padding-left:0px;padding-right:0px;padding-top:0px;padding-bottom:0px;cursor:pointer;cursor:hand;">';
				displayString +=			'<b style="line-height:1px;font-size:1px;display:block;height:1px;overflow: hidden;border-bottom:1px dotted #cc0033;"></b>';
				displayString +=			'<table cellpadding="0" cellspacing="0" border="0"><tr><td style="color:#000000;padding-top:7px;padding-left:7px;font-size:10px;font-weight:normal;font-family:' + tooltipFont + ';">Search Website</td><td span style="color:#000000;display:block;padding-top:7px;padding-left:7px;padding-right:2px;font-size:10px;font-weight:normal;font-family:' + tooltipFont + ';"><input onClick="return false;" style="width:'+ formwidth +'px; height: 15px; font-size: 8pt; font-family' + tooltipFont + ';" id="foop" type="text" value="' + searchArray[lastToolNum] + '" onKeyDown="checkKey();" /></td><td style="padding-top:7px;" align="left"><input src="/whatisintellitxt/images/goBTN.gif" name="Search" type="image" value="search" onSubmit="goSearch();" onClick="goSearch();"/></td></tr></table>';
				displayString +=		'</td>';
				displayString +=	'</tr>';

				
				break;
		
		
			default:
			//	_________________________________
			//
			//	Basic Text-Only Layout [default]
			//	_________________________________
				displayString += '				<table cellpadding="0" cellspacing="0" border="0" style="height:' + contentTableHeight + 'px;border:none;margin:0px 0px;table-layout:auto;position:relative;width:100%;">'
					
				//title
				displayString += '					<tr style="padding:0px 0px;border:none;background-color:transparent;line-height:normal;" onClick="kwC(0,11,event,0);" oncontextmenu="return false;" onMouseOver="kwM(1495917);" onMouseMove="kwM(1495917);">'
				displayString += '						<td style="vertical-align:top;padding:3px 3px 0px 7px;height:1%;" onClick="tooltipClick();" align="left">'
				displayString += '							<span style="padding:0px 0px;line-height:normal;font-family:' + tooltipFont[lastToolNum] + ';background-color:transparent;text-decoration:' + tooltipTitleDecorationOff[lastToolNum] + ';font-size:12px;font-weight:bold;color:' + tooltipTitleColorOff[lastToolNum] + ';" onMouseOver="this.style.textDecoration=\'' + tooltipTitleDecorationOn[lastToolNum] + '\';this.style.color=\'' + tooltipTitleColorOn[lastToolNum] + '\';" onMouseOut="this.style.textDecoration=\'' + tooltipTitleDecorationOff[lastToolNum] + '\';this.style.color=\'' + tooltipTitleColorOff[lastToolNum] + '\';">' + titleArray[lastToolNum] + '</span><br><span style="line-height:7px;display:block;">&nbsp;</span>'
				displayString += '							<span style="padding:0px 0px;line-height:normal;font-family:' + tooltipFont[lastToolNum] + ';background-color:transparent;text-decoration:none;font-size:11px;font-weight:normal;color:#000000;">' + bodyArray[lastToolNum] + '</span>'
				displayString += '						</td>'
				displayString += '					</tr>'
				
				//Call to action button
				displayString += '					<tr>'
				displayString += '						<td style="vertical-align:bottom;padding:3px 14px 0px 7px;" onClick="tooltipClick();" align="right">'
				displayString += '							<img src="http://www.sernavision.com/dm_popup/' + learnMoreButtonFile + '" alt="Learn More">'
				displayString += '						</td>'
				displayString += '					</tr>'
			
				//visible url
				displayString += '					</tr>'
				displayString += '					<tr style="padding:0px 0px;border:none;background-color:transparent;line-height:normal;" valign="top" onClick="kwC(0,11,event,0);" oncontextmenu="return false;" onMouseOver="kwM(1495917);" onMouseMove="kwM(1495917);">'
				displayString += '						<td style="padding:1px 3px 2px 7px;border:none;background-color:transparent;line-height:normal;height:1%;" onClick="tooltipClick();" colspan="2" valign="bottom" align="left"><span style="padding:0px 0px;line-height:11px;font-family:' + tooltipFont[lastToolNum] + ';background-color:transparent;text-decoration:none;font-size:11px;font-weight:normal;color:' + tooltipURLColorOff[lastToolNum] + ';" onMouseOver="this.style.textDecoration=\'' + tooltipURLDecorationOn[lastToolNum] + '\';this.style.color=\'' + tooltipURLColorOn[lastToolNum] + '\';" onMouseOut="this.style.textDecoration=\'' + tooltipURLDecorationOff[lastToolNum] + '\';this.style.color=\'' + tooltipURLColorOff[lastToolNum] + '\';" onClick="return false;">' + linkArray[lastToolNum] + '</span></td>'
				displayString += '					</tr>'
				displayString += '				</table>'
		}	
	
		
		// ** Bottom half of tooltip
		displayString += '			</td>'
		displayString += '		</tr>'
		displayString += '		<tr style="padding:0px 0px;border:none;background-color:transparent;line-height:normal;">'
		displayString += '			<td style="padding:0px 0px;border:none;background-color:transparent;line-height:normal;filter:" onClick="tooltipClick();">'
		displayString += '				<b id="cZn2" name="cZn2" style="font-size:1px;display:block;height:1px;background:' + bottomBkgColor[lastToolNum] + ';border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;margin:0px 1px;"></b>'
		displayString += '				<b id="cZn3" name="cZn3" style="font-size:1px;display:block;height:1px;background:' + bottomBkgColor[lastToolNum] + ';border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;margin:0px 1px;"></b>'
		displayString += '				<b id="cZn4" name="cZn4" style="font-size:1px;display:block;height:1px;background:' + bottomBkgColor[lastToolNum] + ';border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;margin:0px 2px;"></b>'
		displayString += '				<b id="cZn5" name="cZn5" style="font-size:1px;display:block;height:1px;background:' + bottomBkgColor[lastToolNum] + ';border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;margin:0px 2px;border-width:0px 2px;"></b>'
		displayString += '				<b id="cZn6" name="cZn6" style="font-size:1px;display:block;height:1px;background:' + bottomBkgColor[lastToolNum] + ';border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;margin:0px 4px;border-width:0px 2px;"></b>'
		displayString += '				<b class="c1" style="font-size:1px;display:block;height:1px;background:#545454;border-left:1px solid #545454;border-right:1px solid #545454;overflow:hidden;margin:0px 6px;"></b>'
		displayString += '			</td>'
		displayString += '		</tr>'
		displayString += '	</table>'
			
	
	
		// ** Tab options
		
		//	1 Tab
		//	-----
		displayString += '	<div id="tab1Div" style="height:20px;overflow:hidden;line-height:normal;position:absolute;top:1px;border:none;z-index:5001;left:1px;width:auto;"><table cellspacing="0" cellpadding="0" border="0" height="20"><tr><td onClick="tooltipClick();"><img style="padding:0px 0px;margin:0px 0px;border:none;display:inline;" src="http://www.sernavision.com/dm_popup/tb_l.gif" width="7" height="20" border="0" alt=""></td><td style="background:url(http://www.sernavision.com/dm_popup/bkg_gls_lt.gif);background-repeat:repeat-x;color:#4B4B4B;font-size:10px;font-weight:bold;" onClick="tooltipClick();">' + tab1Array[lastToolNum] + '</td><td onClick="tooltipClick();"><img style="padding:0px 0px;margin:0px 0px;border:none;display:inline;" src="http://www.sernavision.com/dm_popup/tb_r.gif" width="9" height="20" border="0" alt=""></td></tr></table></div>'
		displayString += '	<div onMouseDown="MDn(event);" onMouseUp="MUp(event);" id="handle" style="overflow:hidden;width:' + handleWidth + 'px;height:21px;position:absolute;z-index:5005;left:103px;top:0px;cursor:move;"><img src="http://www.sernavision.com/dm_popup/spacer.gif" border="0" width="180" height="21"></div>'
	
		//	2 Tabs
		//	------
		/*
			<div style="height:20px;overflow:hidden;line-height:normal;position:absolute;top:1px;border:none;z-index:5001;left:1px;width:auto;"><table cellspacing="0" cellpadding="0" border="0" height="20"><tr><td onClick="tooltipClick();"><img style="padding:0px 0px;margin:0px 0px;border:none;display:inline;" src="http://www.sernavision.com/dm_popup/tb_l.gif" width="7" height="20" border="0" alt=""></td><td style="background:url(http://www.sernavision.com/dm_popup/bkg_gls_lt.gif);background-repeat:repeat-x;color:#4B4B4B;font-size:10px;border-bottom:1px solid #e5e5db;font-weight:bold;" onClick="tooltipClick();">' + tab1Array[lastToolNum] + '</td><td style="background:url(http://www.sernavision.com/dm_popup/bkg_gls_lt.gif);background-repeat:repeat-x;" onClick="tooltipClick();"><img style="padding:0px 0px;margin:0px 0px;border:none;display:inline;" src="http://www.sernavision.com/dm_popup/tb_r.gif" width="9" height="20" border="0" alt=""></td><td style="background:url(http://www.sernavision.com/dm_popup/bkg_gls_lt.gif);background-repeat:repeat-x;color:#4B4B4B;font-size:10px;border-bottom:1px solid #aaaaa8;padding-left:4px;">' + tab2Array[lastToolNum] + '</td><td><img style="padding:0px 0px;margin:0px 0px;border:none;display:inline;" src="http://www.sernavision.com/dm_popup/tb_r2.gif" width="9" height="20" border="0" alt=""></td></tr></table></div>
		*/
		
		//	2 Tabs, 2nd tab selected
		//	------------------------
		/*	
			<div style="height:20px;overflow:hidden;line-height:normal;position:absolute;top:1px;border:none;z-index:5001;left:1px;width:auto;"><table cellspacing="0" cellpadding="0" border="0" height="20"><tr><td onClick="tooltipClick();"><img style="padding:0px 0px;margin:0px 0px;border:none;display:inline;" src="http://www.sernavision.com/dm_popup/tb_l2.gif" width="7" height="20" border="0" alt=""></td><td style="background:url(http://www.sernavision.com/dm_popup/bkg_gls_lt.gif);background-repeat:repeat-x;color:#4B4B4B;font-size:10px;border-bottom:1px solid #aaaaa8;padding-right:4px;" onClick="tooltipClick();">' + tab1Array[lastToolNum] + '</td><td style="background:url(http://www.sernavision.com/dm_popup/bkg_gls_lt.gif);background-repeat:repeat-x;" onClick="tooltipClick();"><img style="padding:0px 0px;margin:0px 0px;border:none;display:inline;" src="http://www.sernavision.com/dm_popup/tb_l3.gif" width="9" height="20" border="0" alt=""></td><td style="background:url(http://www.sernavision.com/dm_popup/bkg_gls_lt.gif);background-repeat:repeat-x;color:#4B4B4B;font-size:10px;border-bottom:1px solid #e5e5db;font-weight:bold;">' + tab2Array[lastToolNum] + '</td><td><img style="padding:0px 0px;margin:0px 0px;border:none;display:inline;" src="http://www.sernavision.com/dm_popup/tb_r.gif" width="9" height="20" border="0" alt=""></td></tr></table></div>
		*/
		
		
		// ** Floating assets (tab copy, branding, buttons, etc.)
		// ** Floating assets (tab copy, branding, buttons, etc.)
		displayString += '	<div id="ditt" style="width:auto;line-height:normal;position:absolute;top:2px;border:none;z-index:5002;right:14px;"><img style="padding:0px 0px;margin:0px 0px;background:inherit;border:none;display:inline;" src="' + adTypeLogo[lastToolNum] + '" width="26" height="18" border="0" alt="Dufour Michel"><a style="background-color:transparent;" href="http://fr.wikipedia.org/" target="_blank"><img name="bt_what" id="bt_what" onMouseOver="turnImgOn(\'bt_what\');" onMouseOut="turnImgOff(\'bt_what\');" style="padding:0px 0px;margin:0px 0px;background:inherit;border:none;display:inline;" src="http://www.sernavision.com/dm_popup/bt_what_off.gif" width="16" height="17" border="0" alt="Aide"></a><img name="bt_close" id="bt_close" onMouseOver="turnImgOn(\'bt_close\');" onMouseOut="turnImgOff(\'bt_close\');" onClick="fClick(\'close\');" style="padding:0px 0px;margin:0px 0px;background:inherit;border:none;display:inline;" src="http://www.sernavision.com/dm_popup/bt_close_off.gif" width="16" height="17" onClick="ttH(1);" border="0" alt="Fermer"></div>'
		//displayString += '<div id="ITFM2" style="position:absolute;z-index:5200;right:12px;top:35px;"></div>'
		//____________________________________________
		
		
		//HTML Widescreen Flash embed
		if(styleArray[lastToolNum]==6){
			displayString += '<div id="creativeContent" align="right" style="position:absolute;z-index:5200;right:17px;top:27px;"><img onClick="tooltipClick();" src="' + creativeArray[lastToolNum] + '" width="' + creativeWidth[lastToolNum] + '" height="' + creativeHeight[lastToolNum] + '"></div>';
		}
	}
	

	//RENDER TIP
	changeProperty('tooltipBox', 'innerHTML', displayString);

	//CREATE FLASH OBJECT IF NEEDED
	if(isFlash){
		var fo = new FlashObject(creativeArray[lastToolNum], "myFlashMovie", creativeWidth[lastToolNum], creativeHeight[lastToolNum], "8", "#ffdddd");
		//set params
		fo.addParam("wmode", "transparent");
		fo.addParam("scale", "exactfit");
		fo.addParam("swLiveConnect","true");
		fo.addParam("allowScriptAccess", "always");
		fo.addVariable("pageRef",window.location.hostname);
		fo.addVariable("wMin",creativeWidth[lastToolNum]);
		fo.addVariable("hMin",creativeHeight[lastToolNum]);
		fo.addVariable("wMax",maxCreativeWidth[lastToolNum]);
		fo.addVariable("hMax",maxCreativeHeight[lastToolNum]);
		//write to page
		fo.write("creativeContent");
	}
	
	//write to page
	//fo.write("flashcontent");

	//RESIZE TOOLTIP BOX
	var tempWidth = adUnitWidth[lastToolNum] + "px";
	changeStyle('tooltipBox', 'width', tempWidth);

	//POSITION TOOL TIP
	var toolTipBoxWidth = getPropertyValue('tooltipBox', 'offsetWidth')
	var toolTipBoxHeight = getPropertyValue('tooltipBox', 'offsetHeight');
	
	var linkPosX = getRealPos(linkRef,'x') + tooltipXOffset;
	var linkPosY = getRealPos(linkRef,'y') - toolTipBoxHeight + tooltipYOffset;

	//Account for page scrolling. Reposition tooltip as neccesary
	if((getScrollX() + document.body.clientWidth) < (linkPosX + toolTipBoxWidth)){
		var tempOffset = (linkPosX + toolTipBoxWidth) - (getScrollX() + document.body.clientWidth);
		linkPosX -= tempOffset + 6;
	}
	if(getScrollY() > linkPosY){
		var tempName = document.getElementById("link" + lastToolNum);
		var tempOffset = tempName.offsetHeight;
		linkPosY += toolTipBoxHeight - (2*tooltipYOffset) + tempOffset + 4;
	}

	//allow for manual positioning override
	if (navigator.userAgent.indexOf("MSIE 7") > -1){  
	//IE
	linkPosX += xOffsetArray[lastToolNum];
	linkPosY += yOffsetArray[lastToolNum];
	} else{
	//firefox
	linkPosX += FFxOffsetArray[lastToolNum];
	linkPosY += FFyOffsetArray[lastToolNum];	
	}

	//Make it happen
	var linkPosXString = linkPosX + "px";
	var linkPosYString = linkPosY + "px";
	changeStyle('tooltipBox', 'left', linkPosXString);
	changeStyle('tooltipBox', 'top', linkPosYString);

	//THICK DOUBLE UNDERLINE
	changeStyle(linkRefString, 'borderBottomWidth', '3px');

	//REVEAL TIP
	changeStyle('tooltipBox', 'visibility', 'visible');
	
	//ENABLE DRAG
	makeDraggable(document.getElementById('tooltipBox'), document.getElementById('handle'));
	//makeDraggable(document.getElementById('chromeTr'), document.getElementById('chromeTr'));
	
	//tweak HTML assets if needed 
	if(styleArray[lastToolNum]<20){
		document.getElementById('handle').style.width = adUnitWidth[lastToolNum] - (document.getElementById('tab1Div').offsetWidth) - (adUnitWidth[lastToolNum]-document.getElementById('ditt').offsetWidth-document.getElementById('ditt').offsetLeft) - (document.getElementById('bt_what').offsetWidth + document.getElementById('bt_close').offsetWidth);
		document.getElementById('handle').style.left = document.getElementById('tab1Div').offsetWidth;
	
		//resize shadow to fit tooltip
		var shadOffset = 0;
		document.getElementById('ttShadow').style.width = (document.getElementById('itt_table').offsetWidth-shadOffset);
		document.getElementById('ttShadowImage').style.width = (document.getElementById('itt_table').offsetWidth-shadOffset);
		document.getElementById('ttShadow').style.height = (document.getElementById('itt_table').offsetHeight);
		document.getElementById('ttShadowImage').style.height = (document.getElementById('itt_table').offsetHeight);
		
		animatePop();
	}
}



//=============================================
//RUNTIME
//=============================================
//Firefox Style Tweak
if(navigator.appName == "Netscape"){
	document.write("<style>.dmLink{padding-bottom: 1px;}</style>");
}


