// configuration variable for the hint object, these setting will be shared among all hints created by this object

var HINTS_CFG = {
	'wise'       : true, // don't go off screen, don't overlap the object in the document
	'margin'     : 0, //10, // minimum allowed distance between the hint and the window edge (negative values accepted)
	'gap'        : 0, // minimum allowed distance between the hint and the origin (negative values accepted)
	'align'      : 'tcbc', // align of the hint and the origin (by first letters origin's top|middle|bottom left|center|right to hint's top|middle|bottom left|center|right)
	'css'        : 'hintsClass', // a style class name for all hints, applied to DIV element (see style section in the header of the document)
	'show_delay' : 200, // a delay between initiating event (mouseover for example) and hint appearing
	'hide_delay' : 200, //500, // a delay between closing event (mouseout for example) and hint disappearing
	'follow'     : false, // hint follows the mouse as it moves
	'z-index'    : 100, // a z-index for all hint layers
	'IEfix'      : false, // fix IE problem with windowed controls visible through hints (activate if select boxes are visible through the hints)
	'IEtrans'    : ['blendTrans(DURATION=.3)', 'blendTrans(DURATION=.3)'], // [show transition, hide transition] - nice transition effects, only work in IE5+
	'opacity'    : 85 //100 // opacity of the hint in %%
};

// text/HTML of the hints
var HINTS_ITEMS = [
	'<p align="center">The owner of these pages makes no claim for their moral,<br>cultural or other insignificant value and assumes no responsibility or liability<br>for any emotional or intellectual damage resulting from their use. <br><br>We reserve the right to refuse response to any humorless,<br> or otherwise unforgiving responses or flames.<br><br>All rights reserved, and no part of this document may be reproduced<br>without the express written consent of lots of overpaid attorneys.<br><br>Remember they can do nasty stuff like send you to prison<br>where you might end up sharing a jail cell with some big hairy guy<br>that might like to see you in a dress, unless you are into that...<br><br>*** I UNDERSTAND, I AM ENTERING AT MY OWN RISK! ***<br><br></p>',
	'<iframe src="indey.html" frameborder="0" scrolling="no" width="100%" height="17" allowTransparency="true" STYLE="background-color: transparent"></iframe>',
	'<iframe src="http://www.mobiletides.com/mtwap/MTService?screen=177X177&requestType=imageStrip&id=744&display=Santa Ana River entrance (inside)" frameborder="0" scrolling="no" width="250" height="300" allowTransparency="true" STYLE="background-color: transparent"></iframe>',
	'another <b>sample</b> tooltip with the <a href="http://www.softcomplex.com">link</a>',
//	'<iframe src="http://www.retaggr.com/Embed/GaryNeshanian" width="360px" height="300px" frameborder="0" allowtransparency="true" STYLE="background-color: transparent"></iframe>',
//	'<iframe src="zrc/retaggr.html" scrolling="no" width="360px" height="300px" frameborder="0" allowtransparency="true" STYLE="background-color: transparent"></iframe>',
	'<iframe src="icard.html" scrolling="no" width="250px" height="155px" frameborder="0" allowtransparency="true" STYLE="background-color: transparent"></iframe>',
	'<iframe src="m/index.html" scrolling="no" width="220px" height="250px" frameborder="0" allowtransparency="true" STYLE="background-color: transparent"></iframe>',
	'<img src="images/gnish.gif">',
//	'<iframe width="300" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;output=embed&amp;q=92627"></iframe>'
];

var myHint = new THints (HINTS_ITEMS, HINTS_CFG);

if (!readCookie("zipcode") || readCookie("zipcode") == "null") rzip="92663"; else rzip=readCookie("zipcode");

// map names to image files
var A_IMAGES = [
	'tplwz', "http://www.localweather.com/weather/index.php?forecast=hourly&config=png&alt=hwicc&hwvttf=&daysonly=1&hwvbg=&hwvtc=&hwvusettf=0&pands='"+rzip,
	'tp1', "images/gnish.gif",
	'tp2', "images/g6.gif",
	'regtaggr', "images/retaggr.jpg"
];


var HINPS_CFG = {
	'wise'       : true, // don't go off screen, don't overlap the object in the document
	'margin'     : 10, // minimum allowed distance between the hint and the window edge (negative values accepted)
	'gap'        : 10, //20, // minimum allowed distance between the hint and the origin (negative values accepted)
	'align'      : 'bctc', // align of the hint and the origin (by first letters origin's top|middle|bottom left|center|right to hint's top|middle|bottom left|center|right)
	'css'        : 'hinpsClass', // a style class name for all hints, applied to DIV element (see style section in the header of the document)
	'show_delay' : 25, //200, // a delay between initiating event (mouseover for example) and hint appearing
	'hide_delay' : 25, //500, // a delay between closing event (mouseout for example) and hint disappearing
	'follow'     : false, // hint follows the mouse as it moves
	'z-index'    : 100, // a z-index for all hint layers
	'IEfix'      : false, // fix IE problem with windowed controls visible through hints (activate if select boxes are visible through the hints)
	'IEtrans'    : ['revealTrans(TRANSITION=3,DURATION=.5)', 'revealTrans(TRANSITION=2,DURATION=.5)'], // [show transition, hide transition] - transition effects, only work in IE5+
	'opacity'    : 80 // opacity of the hint in %%
};

// generate HTML of the hints from the images list
var HINPS_ITEMS = [];
for (var i = 0; i < A_IMAGES.length; i += 2) { 
	HINPS_ITEMS[A_IMAGES[i]] = '<img src="' + A_IMAGES[i+1] + '" name="im_' + A_IMAGES[i] + '" border="0" />';
	//HINPS_ITEMS[A_IMAGES[i]] = '<img src="images/pixel.gif" name="im_' + A_IMAGES[i] + '" border="1" />';
}

// call this function in onload providing the images list
function f_downloadIMages (a_imgList) {
	for (var i = 0; i < a_imgList.length; i +=2)
		if (document.images['im_' + a_imgList[i]])
			document.images['im_' + a_imgList[i]].src = a_imgList[i+1];
}

var myHinp = new THints (HINPS_ITEMS, HINPS_CFG);

////////////////////


//var myHint = new THints (HINTS_ITEMS, HINTS_CFG);

if (!readCookie("zipcode") || readCookie("zipcode") == "null") rzip="92663"; else rzip=readCookie("zipcode");

// map names to image files
var B_IMAGES = [
	'isa', "icons/isanarchy.gif",
	'isb', "icons/iscuttlebutt.gif",
	'isa', "icons/isanarchy.gif",
	'isw', "icons/isailingworld.gif",
	'isn', "icons/isailingnews.gif",
	'iby', "icons/ibym.gif",
	'ids', "icons/idailysail.gif",
	'ion', "icons/ibball.gif",
	'itl', "icons/ithelog.gif",
	'ius', "icons/iussailing.gif",
	'iis', "icons/iisaf.gif",
	'ins', "icons/ibball.gif",
	'igog', "icons/igoogle.gif",
	'iaol', "icons/iaol.gif",
	'ibng', "icons/ibing.gif",
	'imsn', "icons/imsn.gif",
	'iask', "icons/iask.gif",
	'ihow', "icons/ihowsw.gif",
	'iref', "icons/ireference.gif",
	'icrg', "icons/icraigslist.gif",
	'iwik', "icons/iwikipedia.gif",
	'iyah', "icons/iyahoo.gif",
	'idice', "icons/idice.gif",
	'imons', "icons/imonster.gif",
	'iocrg', "icons/iocregister.gif",
	'icbld', "icons/icareerbuilder.gif",
	'iladr', "icons/iladders.gif",
	'ilink', "icons/ilinkedin.gif",
	'ipmi',  "icons/ipmi.gif"
];


var HINIS_CFG = {
	'wise'       : true, // don't go off screen, don't overlap the object in the document
	'margin'     : 0, //10, // minimum allowed distance between the hint and the window edge (negative values accepted)
	'gap'        : 17, //20, // minimum allowed distance between the hint and the origin (negative values accepted)
	'align'      : 'tctc', //'mlml', //'bctc', // align of the hint and the origin (by first letters origin's top|middle|bottom left|center|right to hint's top|middle|bottom left|center|right)
	'css'        : 'hinpsClass', // a style class name for all hints, applied to DIV element (see style section in the header of the document)
	'show_delay' : 50, //200, // a delay between initiating event (mouseover for example) and hint appearing
	'hide_delay' : 50, //500, // a delay between closing event (mouseout for example) and hint disappearing
	'follow'     : false, // hint follows the mouse as it moves
	'z-index'    : 100, // a z-index for all hint layers
	'IEfix'      : false, // fix IE problem with windowed controls visible through hints (activate if select boxes are visible through the hints)
	'IEtrans'    : ['revealTrans(TRANSITION=3,DURATION=.15)', 'revealTrans(TRANSITION=2,DURATION=.15)'], // [show transition, hide transition] - transition effects, only work in IE5+ // 3 .5 2 .5
	'opacity'    : 80 // opacity of the hint in %%
};

// generate HTML of the hints from the images list
var HINIS_ITEMS = [];
for (var i = 0; i < B_IMAGES.length; i += 2) { 
	HINIS_ITEMS[B_IMAGES[i]] = '<img src="' + B_IMAGES[i+1] + '" name="im_' + B_IMAGES[i] + '" border="0" />';
	//HINIS_ITEMS[B_IMAGES[i]] = '<img src="images/pixel.gif" name="im_' + B_IMAGES[i] + '" border="1" />';
}

// call this function in onload providing the images list
function f_downloadIMages (a_imgList) {
	for (var i = 0; i < a_imgList.length; i +=2)
		if (document.images['im_' + a_imgList[i]])
			document.images['im_' + a_imgList[i]].src = a_imgList[i+1];
}

var myHini = new THints (HINIS_ITEMS, HINIS_CFG);

