﻿var olLoaded = 0;var pmStart = 10000000; var pmUpper = 10001000; var pmCount = pmStart+1; var pmt=''; var pms = new Array(); var olInfo = new Info('4.21', 1);
var FREPLACE = 0; var FBEFORE = 1; var FAFTER = 2; var FALTERNATE = 3; var FCHAIN=4;
var olHideForm=0;  // parameter for hiding SELECT and ActiveX elements in IE5.5+ 
var olHautoFlag = 0;  // flags for over-riding VAUTO and HAUTO if corresponding
var olVautoFlag = 0;  // positioning commands are used on the command line
var hookPts = new Array(), postParse = new Array(), cmdLine = new Array(), runTime = new Array();
registerCommands('donothing,inarray,caparray,sticky,background,noclose,caption,left,right,center,offsetx,offsety,fgcolor,bgcolor,textcolor,capcolor,closecolor,width,border,cellpad,status,autostatus,autostatuscap,height,closetext,snapx,snapy,fixx,fixy,relx,rely,fgbackground,bgbackground,padx,pady,fullhtml,above,below,capicon,textfont,captionfont,closefont,textsize,captionsize,closesize,timeout,function,delay,hauto,vauto,closeclick,wrap,followmouse,mouseoff,closetitle,cssoff,compatmode,cssclass,fgclass,bgclass,textfontclass,captionfontclass,closefontclass');
if (typeof tp_fgcolor=='undefined') var tp_fgcolor="#CCCCFF";
if (typeof tp_bgcolor=='undefined') var tp_bgcolor="#333399";
if (typeof tp_textcolor=='undefined') var tp_textcolor="#FFFFFF";
if (typeof tp_capcolor=='undefined') var tp_capcolor="#FFFFFF";
if (typeof tp_closecolor=='undefined') var tp_closecolor="#9999FF";
if (typeof tp_textfont=='undefined') var tp_textfont="Verdana,Arial,Helvetica";
if (typeof tp_captionfont=='undefined') var tp_captionfont="Verdana,Arial,Helvetica";
if (typeof tp_closefont=='undefined') var tp_closefont="Verdana,Arial,Helvetica";
if (typeof tp_textsize=='undefined') var tp_textsize="1";
if (typeof tp_captionsize=='undefined') var tp_captionsize="1";
if (typeof tp_closesize=='undefined') var tp_closesize="1";
if (typeof tp_width=='undefined') var tp_width="140";
if (typeof tp_border=='undefined') var tp_border="1";
if (typeof tp_cellpad=='undefined') var tp_cellpad=2;
if (typeof tp_offsetx=='undefined') var tp_offsetx=10;
if (typeof tp_offsety=='undefined') var tp_offsety=10;
if (typeof tp_text=='undefined') var tp_text="Default Text";
if (typeof tp_cap=='undefined') var tp_cap="";
if (typeof tp_sticky=='undefined') var tp_sticky=0;
if (typeof tp_background=='undefined') var tp_background="";
if (typeof tp_close=='undefined') var tp_close="Close";
if (typeof tp_hpos=='undefined') var tp_hpos=RIGHT;
if (typeof tp_status=='undefined') var tp_status="";
if (typeof tp_autostatus=='undefined') var tp_autostatus=0;
if (typeof tp_height=='undefined') var tp_height=-1;
if (typeof tp_snapx=='undefined') var tp_snapx=0;
if (typeof tp_snapy=='undefined') var tp_snapy=0;
if (typeof tp_fixx=='undefined') var tp_fixx=-1;
if (typeof tp_fixy=='undefined') var tp_fixy=-1;
if (typeof tp_relx=='undefined') var tp_relx=null;
if (typeof tp_rely=='undefined') var tp_rely=null;
if (typeof tp_fgbackground=='undefined') var tp_fgbackground="";
if (typeof tp_bgbackground=='undefined') var tp_bgbackground="";
if (typeof tp_padxl=='undefined') var tp_padxl=1;
if (typeof tp_padxr=='undefined') var tp_padxr=1;
if (typeof tp_padyt=='undefined') var tp_padyt=1;
if (typeof tp_padyb=='undefined') var tp_padyb=1;
if (typeof tp_fullhtml=='undefined') var tp_fullhtml=0;
if (typeof tp_vpos=='undefined') var tp_vpos=BELOW;
if (typeof tp_aboveheight=='undefined') var tp_aboveheight=0;
if (typeof tp_capicon=='undefined') var tp_capicon="";
if (typeof tp_frame=='undefined') var tp_frame=self;
if (typeof tp_timeout=='undefined') var tp_timeout=0;
if (typeof tp_function=='undefined') var tp_function=null;
if (typeof tp_delay=='undefined') var tp_delay=0;
if (typeof tp_hauto=='undefined') var tp_hauto=0;
if (typeof tp_vauto=='undefined') var tp_vauto=0;
if (typeof tp_closeclick=='undefined') var tp_closeclick=0;
if (typeof tp_wrap=='undefined') var tp_wrap=0;
if (typeof tp_followmouse=='undefined') var tp_followmouse=1;
if (typeof tp_mouseoff=='undefined') var tp_mouseoff=0;
if (typeof tp_closetitle=='undefined') var tp_closetitle='Close';
if (typeof tp_compatmode=='undefined') var tp_compatmode=0;
if (typeof tp_css=='undefined') var tp_css=CSSOFF;
if (typeof tp_fgclass=='undefined') var tp_fgclass="";
if (typeof tp_bgclass=='undefined') var tp_bgclass="";
if (typeof tp_textfontclass=='undefined') var tp_textfontclass="";
if (typeof tp_captionfontclass=='undefined') var tp_captionfontclass="";
if (typeof tp_closefontclass=='undefined') var tp_closefontclass="";
if (typeof tp_texts=='undefined') var tp_texts = new Array("Text 0", "Text 1");
if (typeof tp_caps=='undefined') var tp_caps = new Array("Caption 0", "Caption 1");
var tp_text="";
var tp_cap="";
var tp_sticky=0;
var tp_background="";
var tp_close="Close";
var tp_hpos=RIGHT;
var tp_offsetx=2;
var tp_offsety=2;
var tp_fgcolor="";
var tp_bgcolor="";
var tp_textcolor="";
var tp_capcolor="";
var tp_closecolor="";
var tp_width=140;
var tp_border=1;
var tp_cellpad=2;
var tp_status="";
var tp_autostatus=0;
var tp_height=-1;
var tp_snapx=0;
var tp_snapy=0;
var tp_fixx=-1;
var tp_fixy=-1;
var tp_relx=null;
var tp_rely=null;
var tp_fgbackground="";
var tp_bgbackground="";
var tp_padxl=0;
var tp_padxr=0;
var tp_padyt=0;
var tp_padyb=0;
var tp_fullhtml=0;
var tp_vpos=BELOW;
var tp_aboveheight=0;
var tp_capicon="";
var tp_textfont="Verdana,Arial,Helvetica";
var tp_captionfont="Verdana,Arial,Helvetica";
var tp_closefont="Verdana,Arial,Helvetica";
var tp_textsize="1";
var tp_captionsize="1";
var tp_closesize="1";
var tp_frame=self;
var tp_timeout=0;
var tp_timerid=0;
var tp_allowmove=0;
var tp_function=null; 
var tp_delay=0;
var tp_delayid=0;
var tp_hauto=0;
var tp_vauto=0;
var tp_closeclick=0;
var tp_wrap=0;
var tp_followmouse=1;
var tp_mouseoff=0;
var tp_closetitle='';
var tp_compatmode=0;
var tp_css=CSSOFF;
var tp_fgclass="";
var tp_bgclass="";
var tp_textfontclass="";
var tp_captionfontclass="";
var tp_closefontclass="";
var tp_x = 0;
var tp_y = 0;
var tp_showingsticky = 0;
var tp_removecounter = 0;
var over = null;
var fnRef, hoveringSwitch = false;
var olHideDelay;
var isMac = (navigator.userAgent.indexOf("Mac") != -1);
var olOp = (navigator.userAgent.toLowerCase().indexOf('opera') > -1 && document.createTextNode);  // Opera 7
var olNs4 = (navigator.appName=='Netscape' && parseInt(navigator.appVersion) == 4);
var olNs6 = (document.getElementById) ? true : false;
var olKq = (olNs6 && /konqueror/i.test(navigator.userAgent));
var olIe4 = (document.all) ? true : false;
var olIe5 = false; 
var olIe55 = false; 
var docRoot = 'document.body';
if (olNs4) {
	var oW = window.innerWidth;
	var oH = window.innerHeight;
	window.onresize = function() { if (oW != window.innerWidth || oH != window.innerHeight) location.reload(); }
}
if (olIe4) {
	var agent = navigator.userAgent;
	if (/MSIE/.test(agent)) {
		var versNum = parseFloat(agent.match(/MSIE[ ](\d\.\d+)\.*/i)[1]);
		if (versNum >= 5){
			olIe5=true;
			olIe55=(versNum>=5.5&&!olOp) ? true : false;
			if (olNs6) olNs6=false;
		}
	}
	if (olNs6) olIe4 = false;
}
if (document.compatMode && document.compatMode == 'CSS1Compat') {
	docRoot= ((olIe4 && !olOp) ? 'document.documentElement' : docRoot);
}
if(window.addEventListener) window.addEventListener("load",OLonLoad_handler,false);
else if (window.attachEvent) window.attachEvent("onload",OLonLoad_handler);
var capExtent;
function overlib() {
	if (!olLoaded || isExclusive(overlib.arguments)) return true;
	if (olCheckMouseCapture) olMouseCapture();
	if (over) {
		over = (typeof over.id != 'string') ? tp_frame.document.all['overDiv'] : over;
		cClick();
	}
  olHideDelay=0;
	tp_text=tp_text;
	tp_cap=tp_cap;
	tp_sticky=tp_sticky;
	tp_background=tp_background;
	tp_close=tp_close;
	tp_hpos=tp_hpos;
	tp_offsetx=tp_offsetx;
	tp_offsety=tp_offsety;
	tp_fgcolor=tp_fgcolor;
	tp_bgcolor=tp_bgcolor;
	tp_textcolor=tp_textcolor;
	tp_capcolor=tp_capcolor;
	tp_closecolor=tp_closecolor;
	tp_width=tp_width;
	tp_border=tp_border;
	tp_cellpad=tp_cellpad;
	tp_status=tp_status;
	tp_autostatus=tp_autostatus;
	tp_height=tp_height;
	tp_snapx=tp_snapx;
	tp_snapy=tp_snapy;
	tp_fixx=tp_fixx;
	tp_fixy=tp_fixy;
	tp_relx=tp_relx;
	tp_rely=tp_rely;
	tp_fgbackground=tp_fgbackground;
	tp_bgbackground=tp_bgbackground;
	tp_padxl=tp_padxl;
	tp_padxr=tp_padxr;
	tp_padyt=tp_padyt;
	tp_padyb=tp_padyb;
	tp_fullhtml=tp_fullhtml;
	tp_vpos=tp_vpos;
	tp_aboveheight=tp_aboveheight;
	tp_capicon=tp_capicon;
	tp_textfont=tp_textfont;
	tp_captionfont=tp_captionfont;
	tp_closefont=tp_closefont;
	tp_textsize=tp_textsize;
	tp_captionsize=tp_captionsize;
	tp_closesize=tp_closesize;
	tp_timeout=tp_timeout;
	tp_function=tp_function;
	tp_delay=tp_delay;
	tp_hauto=tp_hauto;
	tp_vauto=tp_vauto;
	tp_closeclick=tp_closeclick;
	tp_wrap=tp_wrap;	
	tp_followmouse=tp_followmouse;
	tp_mouseoff=tp_mouseoff;
	tp_closetitle=tp_closetitle;
	tp_css=tp_css;
	tp_compatmode=tp_compatmode;
	tp_fgclass=tp_fgclass;
	tp_bgclass=tp_bgclass;
	tp_textfontclass=tp_textfontclass;
	tp_captionfontclass=tp_captionfontclass;
	tp_closefontclass=tp_closefontclass;
	setRunTimeVariables();
	fnRef = '';
	tp_frame = tp_frame;
	if(!(over=createDivContainer())) return false;
	parseTokens('tp_', overlib.arguments);
	if (!postParseChecks()) return false;
	if (tp_delay == 0) {
		return runHook("olMain", FREPLACE);
 	} else {
		tp_delayid = setTimeout("runHook('olMain', FREPLACE)", tp_delay);
		return false;
	}
}
function nd(time) {
	if (olLoaded && !isExclusive()) {
		hideDelay(time); 

		if (tp_removecounter >= 1) { tp_showingsticky = 0 };
		
		if (tp_showingsticky == 0) {
			tp_allowmove = 0;
			if (over != null && tp_timerid == 0) runHook("hideObject", FREPLACE, over);
		} else {
			tp_removecounter++;
		}
	}
	return true;
}
function cClick() {
	if (olLoaded) {
		runHook("hideObject", FREPLACE, over);
		tp_showingsticky = 0;	
	}	
	return false;
}

function overlib_pagedefaults() {
	parseTokens('tp_', overlib_pagedefaults.arguments);
}
function olMain() {
	var layerhtml, styleType;
 	runHook("olMain", FBEFORE);
 	
	if (tp_background!="" || tp_fullhtml) {
		layerhtml = runHook('tp_content_background', FALTERNATE, tp_css, tp_text, tp_background, tp_fullhtml);
	} else {
		styleType = (pms[tp_css-1-pmStart] == "cssoff" || pms[tp_css-1-pmStart] == "cssclass");
		if (tp_fgbackground != "") tp_fgbackground = "background=\""+tp_fgbackground+"\"";
		if (tp_bgbackground != "") tp_bgbackground = (styleType ? "background=\""+tp_bgbackground+"\"" : tp_bgbackground);
		if (tp_fgcolor != "") tp_fgcolor = (styleType ? "bgcolor=\""+tp_fgcolor+"\"" : tp_fgcolor);
		if (tp_bgcolor != "") tp_bgcolor = (styleType ? "bgcolor=\""+tp_bgcolor+"\"" : tp_bgcolor);
		if (tp_height > 0) tp_height = (styleType ? "height=\""+tp_height+"\"" : tp_height);
		else tp_height = "";
		if (tp_cap=="") {
			layerhtml = runHook('tp_content_simple', FALTERNATE, tp_css, tp_text);
		} else {
			if (tp_sticky) {
				layerhtml = runHook('tp_content_caption', FALTERNATE, tp_css, tp_text, tp_cap, tp_close);
			} else {
				layerhtml = runHook('tp_content_caption', FALTERNATE, tp_css, tp_text, tp_cap, "");
			}
		}
	}	
	if (tp_sticky) {
		if (tp_timerid > 0) {
			clearTimeout(tp_timerid);
			tp_timerid = 0;
		}
		tp_showingsticky = 1;
		tp_removecounter = 0;
	}
	if (!runHook("createPopup", FREPLACE, layerhtml)) return false;
	if (tp_autostatus > 0) {
		tp_status = tp_text;
		if (tp_autostatus > 1) tp_status = tp_cap;
	}
	tp_allowmove = 0;
	if (tp_timeout > 0) {          
		if (tp_timerid > 0) clearTimeout(tp_timerid);
		tp_timerid = setTimeout("cClick()", tp_timeout);
	}
	runHook("disp", FREPLACE, tp_status);
	runHook("olMain", FAFTER);
	return (olOp && event && event.type == 'mouseover' && !tp_status) ? '' : (tp_status != '');
}
function tp_content_simple(text) {
	var cpIsMultiple = /,/.test(tp_cellpad);
	var txt = '<table width="'+tp_width+ '" border="0" cellpadding="'+tp_border+'" cellspacing="0" '+(tp_bgclass ? 'class="'+tp_bgclass+'"' : tp_bgcolor+' '+tp_height)+'><tr><td><table width="100%" border="0" '+((olNs4||!cpIsMultiple) ? 'cellpadding="'+tp_cellpad+'" ' : '')+'cellspacing="0" '+(tp_fgclass ? 'class="'+tp_fgclass+'"' : tp_fgcolor+' '+tp_fgbackground+' '+tp_height)+'><tr><td valign="TOP"'+(tp_textfontclass ? ' class="'+tp_textfontclass+'">' : ((!olNs4&&cpIsMultiple) ? ' style="'+setCellPadStr(tp_cellpad)+'">' : '>'))+(tp_textfontclass ? '' : wrapStr(0,tp_textsize,'text'))+text+(tp_textfontclass ? '' : wrapStr(1,tp_textsize))+'</td></tr></table></td></tr></table>';

	set_background("");
	return txt;
}
function tp_content_caption(text,title,close) {
	var nameId, txt, cpIsMultiple = /,/.test(tp_cellpad);
	var closing, closeevent;
	closing = "";
	closeevent = "onmouseover";
	if (tp_closeclick == 1) closeevent = (tp_closetitle ? "title='" + tp_closetitle +"'" : "") + " onclick";
	if (tp_capicon != "") {
	  nameId = ' hspace = \"5\"'+' align = \"middle\" alt = \"\"';
	  if (typeof tp_dragimg != 'undefined' && tp_dragimg) nameId =' hspace=\"5\"'+' name=\"'+tp_dragimg+'\" id=\"'+tp_dragimg+'\" align=\"middle\" alt=\"Drag Enabled\" title=\"Drag Enabled\"';
	  tp_capicon = '<img src=\"'+tp_capicon+'\"'+nameId+' />';
	}

	if (close != "")
		closing = '<td '+(!tp_compatmode && tp_closefontclass ? 'class="'+tp_closefontclass : 'align="RIGHT')+'"><a href="javascript:return '+fnRef+'cClick();"'+((tp_compatmode && tp_closefontclass) ? ' class="' + tp_closefontclass + '" ' : ' ')+closeevent+'="return '+fnRef+'cClick();">'+(tp_closefontclass ? '' : wrapStr(0,tp_closesize,'close'))+close+(tp_closefontclass ? '' : wrapStr(1,tp_closesize,'close'))+'</a></td>';
	txt = '<table width="'+tp_width+ '" border="0" cellpadding="'+tp_border+'" cellspacing="0" '+(tp_bgclass ? 'class="'+tp_bgclass+'"' : tp_bgcolor+' '+tp_bgbackground+' '+tp_height)+'><tr><td><table width="100%" border="0" cellpadding="2" cellspacing="0"><tr><td'+(tp_captionfontclass ? ' class="'+tp_captionfontclass+'">' : '>')+(tp_captionfontclass ? '' : '<b>'+wrapStr(0,tp_captionsize,'caption'))+tp_capicon+title+(tp_captionfontclass ? '' : wrapStr(1,tp_captionsize)+'</b>')+'</td>'+closing+'</tr></table><table width="100%" border="0" '+((olNs4||!cpIsMultiple) ? 'cellpadding="'+tp_cellpad+'" ' : '')+'cellspacing="0" '+(tp_fgclass ? 'class="'+tp_fgclass+'"' : tp_fgcolor+' '+tp_fgbackground+' '+tp_height)+'><tr><td valign="TOP"'+(tp_textfontclass ? ' class="'+tp_textfontclass+'">' :((!olNs4&&cpIsMultiple) ? ' style="'+setCellPadStr(tp_cellpad)+'">' : '>'))+(tp_textfontclass ? '' : wrapStr(0,tp_textsize,'text'))+text+(tp_textfontclass ? '' : wrapStr(1,tp_textsize)) + '</td></tr></table></td></tr></table>';

	set_background("");
	return txt;
}
function tp_content_background(text,picture,hasfullhtml) {
	if (hasfullhtml) {
		txt=text;
	} else {
		txt='<table width="'+tp_width+'" border="0" cellpadding="0" cellspacing="0" height="'+tp_height+'"><tr><td colspan="3" height="'+tp_padyt+'"></td></tr><tr><td width="'+tp_padxl+'"></td><td valign="TOP" width="'+(tp_width-tp_padxl-tp_padxr)+(tp_textfontclass ? '" class="'+tp_textfontclass : '')+'">'+(tp_textfontclass ? '' : wrapStr(0,tp_textsize,'text'))+text+(tp_textfontclass ? '' : wrapStr(1,tp_textsize))+'</td><td width="'+tp_padxr+'"></td></tr><tr><td colspan="3" height="'+tp_padyb+'"></td></tr></table>';
	}

	set_background(picture);
	return txt;
}

// Loads a picture into the div.
function set_background(pic) {
	if (pic == "") {
		if (olNs4) {
			over.background.src = null; 
		} else if (over.style) {
			over.style.backgroundImage = "none";
		}
	} else {
		if (olNs4) {
			over.background.src = pic;
		} else if (over.style) {
			over.style.width=tp_width + 'px';
			over.style.backgroundImage = "url("+pic+")";
		}
	}
}


var olShowId=-1;


function disp(statustext) {
	runHook("disp", FBEFORE);
	
	if (tp_allowmove == 0) {
		runHook("placeLayer", FREPLACE);
		(olNs6&&olShowId<0) ? olShowId=setTimeout("runHook('showObject', FREPLACE, over)", 1) : runHook("showObject", FREPLACE, over);
		tp_allowmove = (tp_sticky || tp_followmouse==0) ? 0 : 1;
	}
	
	runHook("disp", FAFTER);

	if (statustext != "") self.status = statustext;
}
function createPopup(lyrContent){
	runHook("createPopup", FBEFORE);
	if (tp_wrap) {
		var wd,ww,theObj = (olNs4 ? over : over.style);
		theObj.top = theObj.left = ((olIe4&&!olOp) ? 0 : -10000) + (!olNs4 ? 'px' : 0);
		layerWrite(lyrContent);
		wd = (olNs4 ? over.clip.width : over.offsetWidth);
		if (wd > (ww=windowWidth())) {
			lyrContent=lyrContent.replace(/\&nbsp;/g, ' ');
			tp_width=ww;
			tp_wrap=0;
		} 
	}
	layerWrite(lyrContent);
	if (tp_wrap) tp_width=(olNs4 ? over.clip.width : over.offsetWidth);
	runHook("createPopup", FAFTER, lyrContent);
	return true;
}
function placeLayer() {
	var placeX, placeY, widthFix = 0;
	if (tp_frame.innerWidth) widthFix=18; 
	iwidth = windowWidth();
	winoffset=(olIe4) ? eval('tp_frame.'+docRoot+'.scrollLeft') : tp_frame.pageXOffset;
	placeX = runHook('horizontalPlacement',FCHAIN,iwidth,winoffset,widthFix);
	if (tp_frame.innerHeight) {
		iheight=tp_frame.innerHeight;
	} else if (eval('tp_frame.'+docRoot)&&eval("typeof tp_frame."+docRoot+".clientHeight=='number'")&&eval('tp_frame.'+docRoot+'.clientHeight')) { 
		iheight=eval('tp_frame.'+docRoot+'.clientHeight');
	}			
	scrolloffset=(olIe4) ? eval('tp_frame.'+docRoot+'.scrollTop') : tp_frame.pageYOffset;
	placeY = runHook('verticalPlacement',FCHAIN,iheight,scrolloffset);
	repositionTo(over, placeX, placeY);
}
function olMouseMove(e) {
	var e = (e) ? e : event;
	if (e.pageX) {
		tp_x = e.pageX;
		tp_y = e.pageY;
	} else if (e.clientX) {
		tp_x = eval('e.clientX+tp_frame.'+docRoot+'.scrollLeft');
		tp_y = eval('e.clientY+tp_frame.'+docRoot+'.scrollTop');
	}
	if (tp_allowmove == 1) runHook("placeLayer", FREPLACE);
	if (hoveringSwitch && !olNs4 && runHook("cursorOff", FREPLACE)) {
		(olHideDelay ? hideDelay(olHideDelay) : cClick());
		hoveringSwitch = !hoveringSwitch;
	}
}
function no_overlib() { return ver3fix; }
function olMouseCapture() {
	capExtent = document;
	var fN, str = '', l, k, f, wMv, sS, mseHandler = olMouseMove;
	var re = /function[ ]*(\w*)\(/;
	wMv = (!olIe4 && window.onmousemove);
	if (document.onmousemove || wMv) {
		if (wMv) capExtent = window;
		f = capExtent.onmousemove.toString();
		fN = f.match(re);
		if (fN == null) {
			str = f+'(e); ';
		} else if (fN[1] == 'anonymous' || fN[1] == 'olMouseMove' || (wMv && fN[1] == 'onmousemove')) {
			if (!olOp && wMv) {
				l = f.indexOf('{')+1;
				k = f.lastIndexOf('}');
				sS = f.substring(l,k);
				if ((l = sS.indexOf('(')) != -1) {
					sS = sS.substring(0,l).replace(/^\s+/,'').replace(/\s+$/,'');
					if (eval("typeof " + sS + " == 'undefined'")) window.onmousemove = null;
					else str = sS + '(e);';
				}
			}
			if (!str) {
				olCheckMouseCapture = false;
				return;
			}
		} else {
			if (fN[1]) str = fN[1]+'(e); ';
			else {
				l = f.indexOf('{')+1;
				k = f.lastIndexOf('}');
				str = f.substring(l,k) + '\n';
			}
		}
		str += 'olMouseMove(e); ';
		mseHandler = new Function('e', str);
	}
	capExtent.onmousemove = mseHandler;
	if (olNs4) capExtent.captureEvents(Event.MOUSEMOVE);
}
function parseTokens(pf, ar) {
	var v, i, mode=-1, par = (pf != 'tp_');	
	var fnMark = (par && !ar.length ? 1 : 0);

	for (i = 0; i < ar.length; i++) {
		if (mode < 0) {
			if (typeof ar[i] == 'number' && ar[i] > pmStart && ar[i] < pmUpper) {
				fnMark = (par ? 1 : 0);
				i--;  
			} else {
				switch(pf) {
					case 'tp_':
						tp_text = ar[i].toString();
						break;
					default:
						tp_text=ar[i].toString();  
				}
			}
			mode = 0;
		} else {
			if (ar[i] >= pmCount || ar[i]==DONOTHING) { continue; }
			if (ar[i]==INARRAY) { fnMark = 0; eval(pf+'text=tp_texts['+ar[++i]+'].toString()'); continue; }
			if (ar[i]==CAPARRAY) { eval(pf+'cap=tp_caps['+ar[++i]+'].toString()'); continue; }
			if (ar[i]==STICKY) { if (pf!='tp_') eval(pf+'sticky=1'); continue; }
			if (ar[i]==BACKGROUND) { eval(pf+'background="'+ar[++i]+'"'); continue; }
			if (ar[i]==NOCLOSE) { if (pf!='tp_') opt_NOCLOSE(); continue; }
			if (ar[i]==CAPTION) { eval(pf+"cap='"+escSglQuote(ar[++i])+"'"); continue; }
			if (ar[i]==CENTER || ar[i]==LEFT || ar[i]==RIGHT) { eval(pf+'hpos='+ar[i]); if(pf!='tp_') olHautoFlag=1; continue; }
			if (ar[i]==OFFSETX) { eval(pf+'offsetx='+ar[++i]); continue; }
			if (ar[i]==OFFSETY) { eval(pf+'offsety='+ar[++i]); continue; }
			if (ar[i]==FGCOLOR) { eval(pf+'fgcolor="'+ar[++i]+'"'); continue; }
			if (ar[i]==BGCOLOR) { eval(pf+'bgcolor="'+ar[++i]+'"'); continue; }
			if (ar[i]==TEXTCOLOR) { eval(pf+'textcolor="'+ar[++i]+'"'); continue; }
			if (ar[i]==CAPCOLOR) { eval(pf+'capcolor="'+ar[++i]+'"'); continue; }
			if (ar[i]==CLOSECOLOR) { eval(pf+'closecolor="'+ar[++i]+'"'); continue; }
			if (ar[i]==WIDTH) { eval(pf+'width='+ar[++i]); continue; }
			if (ar[i]==BORDER) { eval(pf+'border='+ar[++i]); continue; }
			if (ar[i]==CELLPAD) { i=opt_MULTIPLEARGS(++i,ar,(pf+'cellpad')); continue; }
			if (ar[i]==STATUS) { eval(pf+"status='"+escSglQuote(ar[++i])+"'"); continue; }
			if (ar[i]==AUTOSTATUS) { eval(pf +'autostatus=('+pf+'autostatus == 1) ? 0 : 1'); continue; }
			if (ar[i]==AUTOSTATUSCAP) { eval(pf +'autostatus=('+pf+'autostatus == 2) ? 0 : 2'); continue; }
			if (ar[i]==HEIGHT) { eval(pf+'height='+pf+'aboveheight='+ar[++i]); continue; } // Same param again.
			if (ar[i]==CLOSETEXT) { eval(pf+"close='"+escSglQuote(ar[++i])+"'"); continue; }
			if (ar[i]==SNAPX) { eval(pf+'snapx='+ar[++i]); continue; }
			if (ar[i]==SNAPY) { eval(pf+'snapy='+ar[++i]); continue; }
			if (ar[i]==FIXX) { eval(pf+'fixx='+ar[++i]); continue; }
			if (ar[i]==FIXY) { eval(pf+'fixy='+ar[++i]); continue; }
			if (ar[i]==RELX) { eval(pf+'relx='+ar[++i]); continue; }
			if (ar[i]==RELY) { eval(pf+'rely='+ar[++i]); continue; }
			if (ar[i]==FGBACKGROUND) { eval(pf+'fgbackground="'+ar[++i]+'"'); continue; }
			if (ar[i]==BGBACKGROUND) { eval(pf+'bgbackground="'+ar[++i]+'"'); continue; }
			if (ar[i]==PADX) { eval(pf+'padxl='+ar[++i]); eval(pf+'padxr='+ar[++i]); continue; }
			if (ar[i]==PADY) { eval(pf+'padyt='+ar[++i]); eval(pf+'padyb='+ar[++i]); continue; }
			if (ar[i]==FULLHTML) { if (pf!='tp_') eval(pf+'fullhtml=1'); continue; }
			if (ar[i]==BELOW || ar[i]==ABOVE) { eval(pf+'vpos='+ar[i]); if (pf!='tp_') olVautoFlag=1; continue; }
			if (ar[i]==CAPICON) { eval(pf+'capicon="'+ar[++i]+'"'); continue; }
			if (ar[i]==TEXTFONT) { eval(pf+"textfont='"+escSglQuote(ar[++i])+"'"); continue; }
			if (ar[i]==CAPTIONFONT) { eval(pf+"captionfont='"+escSglQuote(ar[++i])+"'"); continue; }
			if (ar[i]==CLOSEFONT) { eval(pf+"closefont='"+escSglQuote(ar[++i])+"'"); continue; }
			if (ar[i]==TEXTSIZE) { eval(pf+'textsize="'+ar[++i]+'"'); continue; }
			if (ar[i]==CAPTIONSIZE) { eval(pf+'captionsize="'+ar[++i]+'"'); continue; }
			if (ar[i]==CLOSESIZE) { eval(pf+'closesize="'+ar[++i]+'"'); continue; }
			if (ar[i]==TIMEOUT) { eval(pf+'timeout='+ar[++i]); continue; }
			if (ar[i]==FUNCTION) { if (pf=='tp_') { if (typeof ar[i+1]!='number') { v=ar[++i]; tp_function=(typeof v=='function' ? v : null); }} else {fnMark = 0; v = null; if (typeof ar[i+1]!='number') v = ar[++i];  opt_FUNCTION(v); } continue; }
			if (ar[i]==DELAY) { eval(pf+'delay='+ar[++i]); continue; }
			if (ar[i]==HAUTO) { eval(pf+'hauto=('+pf+'hauto == 0) ? 1 : 0'); continue; }
			if (ar[i]==VAUTO) { eval(pf+'vauto=('+pf+'vauto == 0) ? 1 : 0'); continue; }
			if (ar[i]==CLOSECLICK) { eval(pf +'closeclick=('+pf+'closeclick == 0) ? 1 : 0'); continue; }
			if (ar[i]==WRAP) { eval(pf +'wrap=('+pf+'wrap == 0) ? 1 : 0'); continue; }
			if (ar[i]==FOLLOWMOUSE) { eval(pf +'followmouse=('+pf+'followmouse == 1) ? 0 : 1'); continue; }
			if (ar[i]==MOUSEOFF) { eval(pf +'mouseoff=('+pf+'mouseoff==0) ? 1 : 0'); v=ar[i+1]; if (pf != 'tp_' && eval(pf+'mouseoff') && typeof v == 'number' && (v < pmStart || v > pmUpper)) olHideDelay=ar[++i]; continue; }
			if (ar[i]==CLOSETITLE) { eval(pf+"closetitle='"+escSglQuote(ar[++i])+"'"); continue; }
			if (ar[i]==CSSOFF||ar[i]==CSSCLASS) { eval(pf+'css='+ar[i]); continue; }
			if (ar[i]==COMPATMODE) { eval(pf+'compatmode=('+pf+'compatmode==0) ? 1 : 0'); continue; }
			if (ar[i]==FGCLASS) { eval(pf+'fgclass="'+ar[++i]+'"'); continue; }
			if (ar[i]==BGCLASS) { eval(pf+'bgclass="'+ar[++i]+'"'); continue; }
			if (ar[i]==TEXTFONTCLASS) { eval(pf+'textfontclass="'+ar[++i]+'"'); continue; }
			if (ar[i]==CAPTIONFONTCLASS) { eval(pf+'captionfontclass="'+ar[++i]+'"'); continue; }
			if (ar[i]==CLOSEFONTCLASS) { eval(pf+'closefontclass="'+ar[++i]+'"'); continue; }
			i = parseCmdLine(pf, i, ar);
		}
	}
	if (fnMark && tp_function) tp_text = tp_function();
	if ((pf == 'tp_') && tp_wrap) {
		tp_width = 0;
		var tReg=/<.*\n*>/ig;
		if (!tReg.test(tp_text)) tp_text = tp_text.replace(/[ ]+/g, '&nbsp;');
		if (!tReg.test(tp_cap))tp_cap = tp_cap.replace(/[ ]+/g, '&nbsp;');
	}
	if ((pf == 'tp_') && tp_sticky) {
		if (!tp_close && (tp_frame != tp_frame)) tp_close = tp_close;
		if (tp_mouseoff && (tp_frame == tp_frame)) opt_NOCLOSE(' ');
	}
}
function layerWrite(txt) {
	txt += "\n";
	if (olNs4) {
		var lyr = tp_frame.document.layers['overDiv'].document
		lyr.write(txt)
		lyr.close()
	} else if (typeof over.innerHTML != 'undefined') {
		if (olIe5 && isMac) over.innerHTML = '';
		over.innerHTML = txt;
	} else {
		range = tp_frame.document.createRange();
		range.setStartAfter(over);
		domfrag = range.createContextualFragment(txt);
		
		while (over.hasChildNodes()) {
			over.removeChild(over.lastChild);
		}
		
		over.appendChild(domfrag);
	}
}

function showObject(obj) {
	runHook("showObject", FBEFORE);

	var theObj=(olNs4 ? obj : obj.style);
	theObj.visibility = 'visible';
	runHook("showObject", FAFTER);
}
function hideObject(obj) {
	runHook("hideObject", FBEFORE);
	var theObj=(olNs4 ? obj : obj.style);
	if (olNs6 && olShowId>0) { clearTimeout(olShowId); olShowId=0; }
	theObj.visibility = 'hidden';
	theObj.top = theObj.left = ((olIe4&&!olOp) ? 0 : -10000) + (!olNs4 ? 'px' : 0);
	if (tp_timerid > 0) clearTimeout(tp_timerid);
	if (tp_delayid > 0) clearTimeout(tp_delayid);
	tp_timerid = 0;
	tp_delayid = 0;
	self.status = "";
	if (obj.onmouseout||obj.onmouseover) {
		if (olNs4) obj.releaseEvents(Event.MOUSEOUT || Event.MOUSEOVER);
		obj.onmouseout = obj.onmouseover = null;
	}
	runHook("hideObject", FAFTER);
}
function repositionTo(obj, xL, yL) {
	var theObj=(olNs4 ? obj : obj.style);
	theObj.left = xL + (!olNs4 ? 'px' : 0);
	theObj.top = yL + (!olNs4 ? 'px' : 0);
}
function cursorOff() {
	var left = parseInt(over.style.left);
	var top = parseInt(over.style.top);
	var right = left + (over.offsetWidth >= parseInt(tp_width) ? over.offsetWidth : parseInt(tp_width));
	var bottom = top + (over.offsetHeight >= tp_aboveheight ? over.offsetHeight : tp_aboveheight);
	if (tp_x < left || tp_x > right || tp_y < top || tp_y > bottom) return true;

	return false;
}
function opt_FUNCTION(callme) {
	tp_text = (callme ? (typeof callme=='string' ? (/.+\(.*\)/.test(callme) ? eval(callme) : callme) : callme()) : (tp_function ? tp_function() : 'No Function'));

	return 0;
}
function opt_NOCLOSE(unused) {
	if (!unused) tp_close = "";
	if (olNs4) {
		over.captureEvents(Event.MOUSEOUT || Event.MOUSEOVER);
		over.onmouseover = function () { if (tp_timerid > 0) { clearTimeout(tp_timerid); tp_timerid = 0; } }
		over.onmouseout = function (e) { if (olHideDelay) hideDelay(olHideDelay); else cClick(e); }
	} else {
		over.onmouseover = function () {hoveringSwitch = true; if (tp_timerid > 0) { clearTimeout(tp_timerid); tp_timerid =0; } }
	}
	return 0;
}
function opt_MULTIPLEARGS(i, args, parameter) {
  var k=i, re, pV, str='';
  for(k=i; k<args.length; k++) {
		if(typeof args[k] == 'number' && args[k]>pmStart) break;
		str += args[k] + ',';
	}
	if (str) str = str.substring(0,--str.length);
	k--;  
	pV=(olNs4 && /cellpad/i.test(parameter)) ? str.split(',')[0] : str;
	eval(parameter + '="' + pV + '"');
	return k;
}
function nbspCleanup() {
	if (tp_wrap) {
		tp_text = tp_text.replace(/\&nbsp;/g, ' ');
		tp_cap = tp_cap.replace(/\&nbsp;/g, ' ');
	}
}
function escSglQuote(str) {
  return str.toString().replace(/'/g,"\\'");
}
function OLonLoad_handler(e) {
	var re = /\w+\(.*\)[;\s]+/g, olre = /overlib\(|nd\(|cClick\(/, fn, l, i;

	if(!olLoaded) olLoaded=1;

	if(window.removeEventListener && e.eventPhase == 3) window.removeEventListener("load",OLonLoad_handler,false);
	else if(window.detachEvent) { // and for IE and Opera 4.x but execute calls to overlib, nd, or cClick()
		window.detachEvent("onload",OLonLoad_handler);
		var fN = document.body.getAttribute('onload');
		if (fN) {
			fN=fN.toString().match(re);
			if (fN && fN.length) {
				for (i=0; i<fN.length; i++) {
					if (/anonymous/.test(fN[i])) continue;
					while((l=fN[i].search(/\)[;\s]+/)) != -1) {
						fn=fN[i].substring(0,l+1);
						fN[i] = fN[i].substring(l+2);
						if (olre.test(fn)) eval(fn);
					}
				}
			}
		}
	}
}
function wrapStr(endWrap,fontSizeStr,whichString) {
	var fontStr, fontColor, isClose=((whichString=='close') ? 1 : 0), hasDims=/[%\-a-z]+$/.test(fontSizeStr);
	fontSizeStr = (olNs4) ? (!hasDims ? fontSizeStr : '1') : fontSizeStr;
	if (endWrap) return (hasDims&&!olNs4) ? (isClose ? '</span>' : '</div>') : '</font>';
	else {
		fontStr='tp_'+whichString+'font';
		fontColor='tp_'+((whichString=='caption')? 'cap' : whichString)+'color';
		return (hasDims&&!olNs4) ? (isClose ? '<span style="font-family: '+quoteMultiNameFonts(eval(fontStr))+'; color: '+eval(fontColor)+'; font-size: '+fontSizeStr+';">' : '<div style="font-family: '+quoteMultiNameFonts(eval(fontStr))+'; color: '+eval(fontColor)+'; font-size: '+fontSizeStr+';">') : '<font face="'+eval(fontStr)+'" color="'+eval(fontColor)+'" size="'+(parseInt(fontSizeStr)>7 ? '7' : fontSizeStr)+'">';
	}
}

function quoteMultiNameFonts(theFont) {
	var v, pM=theFont.split(',');
	for (var i=0; i<pM.length; i++) {
		v=pM[i];
		v=v.replace(/^\s+/,'').replace(/\s+$/,'');
		if(/\s/.test(v) && !/['"]/.test(v)) {
			v="\'"+v+"\'";
			pM[i]=v;
		}
	}
	return pM.join();
}
function isExclusive(args) {
	return false;
}
function setCellPadStr(parameter) {
	var Str='', j=0, ary = new Array(), top, bottom, left, right;
	Str+='padding: ';
	ary=parameter.replace(/\s+/g,'').split(',');

	switch(ary.length) {
		case 2:
			top=bottom=ary[j];
			left=right=ary[++j];
			break;
		case 3:
			top=ary[j];
			left=right=ary[++j];
			bottom=ary[++j];
			break;
		case 4:
			top=ary[j];
			right=ary[++j];
			bottom=ary[++j];
			left=ary[++j];
			break;
	}

	Str+= ((ary.length==1) ? ary[0] + 'px;' : top + 'px ' + right + 'px ' + bottom + 'px ' + left + 'px;');

	return Str;
}

function hideDelay(time) {
	if (time&&!tp_delay) {
		if (tp_timerid > 0) clearTimeout(tp_timerid);

		tp_timerid=setTimeout("cClick()",(tp_timeout=time));
	}
}

function horizontalPlacement(browserWidth, horizontalScrollAmount, widthFix) {
	var placeX, iwidth=browserWidth, winoffset=horizontalScrollAmount;
	var parsedWidth = parseInt(tp_width);

	if (tp_fixx > -1 || tp_relx != null) {
		// Fixed position
		placeX=(tp_relx != null ? ( tp_relx < 0 ? winoffset +tp_relx+ iwidth - parsedWidth - widthFix : winoffset+tp_relx) : tp_fixx);
	} else {  
		if (tp_hauto == 1) {
			if ((tp_x - winoffset) > (iwidth / 2)) {
				tp_hpos = LEFT;
			} else {
				tp_hpos = RIGHT;
			}
		}  		

		if (tp_hpos == CENTER) { 
			placeX = tp_x+tp_offsetx-(parsedWidth/2);

			if (placeX < winoffset) placeX = winoffset;
		}

		if (tp_hpos == RIGHT) { 
			placeX = tp_x+tp_offsetx;

			if ((placeX+parsedWidth) > (winoffset+iwidth - widthFix)) {
				placeX = iwidth+winoffset - parsedWidth - widthFix;
				if (placeX < 0) placeX = 0;
			}
		}
		if (tp_hpos == LEFT) { 
			placeX = tp_x-tp_offsetx-parsedWidth;
			if (placeX < winoffset) placeX = winoffset;
		}  	
		if (tp_snapx > 1) {
			var snapping = placeX % tp_snapx;

			if (tp_hpos == LEFT) {
				placeX = placeX - (tp_snapx+snapping);
			} else {
				placeX = placeX+(tp_snapx - snapping);
			}

			if (placeX < winoffset) placeX = winoffset;
		}
	}	

	return placeX;
}

function verticalPlacement(browserHeight,verticalScrollAmount) {
	var placeY, iheight=browserHeight, scrolloffset=verticalScrollAmount;
	var parsedHeight=(tp_aboveheight ? parseInt(tp_aboveheight) : (olNs4 ? over.clip.height : over.offsetHeight));

	if (tp_fixy > -1 || tp_rely != null) {
		placeY=(tp_rely != null ? (tp_rely < 0 ? scrolloffset+tp_rely+iheight - parsedHeight : scrolloffset+tp_rely) : tp_fixy);
	} else {
		if (tp_vauto == 1) {
			if ((tp_y - scrolloffset) > (iheight / 2) && tp_vpos == BELOW && (tp_y + parsedHeight + tp_offsety - (scrolloffset + iheight) > 0)) {
				tp_vpos = ABOVE;
			} else if (tp_vpos == ABOVE && (tp_y - (parsedHeight + tp_offsety) - scrolloffset < 0)) {
				tp_vpos = BELOW;
			}
		}
		if (tp_vpos == ABOVE) {
			if (tp_aboveheight == 0) tp_aboveheight = parsedHeight; 

			placeY = tp_y - (tp_aboveheight+tp_offsety);
			if (placeY < scrolloffset) placeY = scrolloffset;
		} else {
			placeY = tp_y+tp_offsety;
		} 
		if (tp_snapy > 1) {
			var snapping = placeY % tp_snapy;  			

			if (tp_aboveheight > 0 && tp_vpos == ABOVE) {
				placeY = placeY - (tp_snapy+snapping);
			} else {
				placeY = placeY+(tp_snapy - snapping);
			} 			

			if (placeY < scrolloffset) placeY = scrolloffset;
		}
	}
	return placeY;
}
function checkPositionFlags() {
	if (olHautoFlag) olHautoFlag = tp_hauto=0;
	if (olVautoFlag) olVautoFlag = tp_vauto=0;
	return true;
}
function windowWidth() {
	var w;
	if (tp_frame.innerWidth) w=tp_frame.innerWidth;
	else if (eval('tp_frame.'+docRoot)&&eval("typeof tp_frame."+docRoot+".clientWidth=='number'")&&eval('tp_frame.'+docRoot+'.clientWidth')) 
		w=eval('tp_frame.'+docRoot+'.clientWidth');
	return w;			
}
function createDivContainer(id,frm,zValue) {
	id = (id || 'overDiv'), frm = (frm || tp_frame), zValue = (zValue || 1000);
	var objRef, divContainer = layerReference(id);

	if (divContainer == null) {
		if (olNs4) {
			divContainer = frm.document.layers[id] = new Layer(window.innerWidth, frm);
			objRef = divContainer;
		} else {
			var body = (olIe4 ? frm.document.all.tags('BODY')[0] : frm.document.getElementsByTagName("BODY")[0]);
			if (olIe4&&!document.getElementById) {
				body.insertAdjacentHTML("beforeEnd",'<div id="'+id+'"></div>');
				divContainer=layerReference(id);
			} else {
				divContainer = frm.document.createElement("DIV");
				divContainer.id = id;
				body.appendChild(divContainer);
			}
			objRef = divContainer.style;
		}

		objRef.position = 'absolute';
		objRef.visibility = 'hidden';
		objRef.zIndex = zValue;
		if (olIe4&&!olOp) objRef.left = objRef.top = '0px';
		else objRef.left = objRef.top =  -10000 + (!olNs4 ? 'px' : 0);
	}

	return divContainer;
}
function layerReference(id) {
	return (olNs4 ? tp_frame.document.layers[id] : (document.all ? tp_frame.document.all[id] : tp_frame.document.getElementById(id)));
}

function isFunction(fnRef) {
	var rtn = true;

	if (typeof fnRef == 'object') {
		for (var i = 0; i < fnRef.length; i++) {
			if (typeof fnRef[i]=='function') continue;
			rtn = false;
			break;
		}
	} else if (typeof fnRef != 'function') {
		rtn = false;
	}
	
	return rtn;
}
function argToString(array, strtInd, argName) {
	var jS = strtInd, aS = '', ar = array;
	argName=(argName ? argName : 'ar');
	
	if (ar.length > jS) {
		for (var k = jS; k < ar.length; k++) aS += argName+'['+k+'], ';
		aS = aS.substring(0, aS.length-2);
	}
	
	return aS;
}
function reOrder(hookPt, fnRef, order) {
	var newPt = new Array(), match, i, j;

	if (!order || typeof order == 'undefined' || typeof order == 'number') return hookPt;
	
	if (typeof order=='function') {
		if (typeof fnRef=='object') {
			newPt = newPt.concat(fnRef);
		} else {
			newPt[newPt.length++]=fnRef;
		}
		
		for (i = 0; i < hookPt.length; i++) {
			match = false;
			if (typeof fnRef == 'function' && hookPt[i] == fnRef) {
				continue;
			} else {
				for(j = 0; j < fnRef.length; j++) if (hookPt[i] == fnRef[j]) {
					match = true;
					break;
				}
			}
			if (!match) newPt[newPt.length++] = hookPt[i];
		}
		newPt[newPt.length++] = order;
	} else if (typeof order == 'object') {
		if (typeof fnRef == 'object') {
			newPt = newPt.concat(fnRef);
		} else {
			newPt[newPt.length++] = fnRef;
		}
		
		for (j = 0; j < hookPt.length; j++) {
			match = false;
			if (typeof fnRef == 'function' && hookPt[j] == fnRef) {
				continue;
			} else {
				for (i = 0; i < fnRef.length; i++) if (hookPt[j] == fnRef[i]) {
					match = true;
					break;
				}
			}
			if (!match) newPt[newPt.length++]=hookPt[j];
		}

		for (i = 0; i < newPt.length; i++) hookPt[i] = newPt[i];
		newPt.length = 0;
		
		for (j = 0; j < hookPt.length; j++) {
			match = false;
			for (i = 0; i < order.length; i++) {
				if (hookPt[j] == order[i]) {
					match = true;
					break;
				}
			}
			if (!match) newPt[newPt.length++] = hookPt[j];
		}
		newPt = newPt.concat(order);
	}

	hookPt = newPt;

	return hookPt;
}

function setRunTimeVariables(){
	if (typeof runTime != 'undefined' && runTime.length) {
		for (var k = 0; k < runTime.length; k++) {
			runTime[k]();
		}
	}
}
function parseCmdLine(pf, i, args) {
	if (typeof cmdLine != 'undefined' && cmdLine.length) { 
		for (var k = 0; k < cmdLine.length; k++) { 
			var j = cmdLine[k](pf, i, args);
			if (j >- 1) {
				i = j;
				break;
			}
		}
	}

	return i;
}
function postParseChecks(pf,args){
	if (typeof postParse != 'undefined' && postParse.length) {
		for (var k = 0; k < postParse.length; k++) {
			if (postParse[k](pf,args)) continue;
			return false;  // end now since have an error
		}
	}
	return true;
}
function registerCommands(cmdStr) {
	if (typeof cmdStr!='string') return;

	var pM = cmdStr.split(',');
	pms = pms.concat(pM);

	for (var i = 0; i< pM.length; i++) {
		eval(pM[i].toUpperCase()+'='+pmCount++);
	}
}
function registerNoParameterCommands(cmdStr) {
	if (!cmdStr && typeof cmdStr != 'string') return;
	pmt=(!pmt) ? cmdStr : pmt + ',' + cmdStr;
}
function registerHook(fnHookTo, fnRef, hookType, optPm) {
	var hookPt, last = typeof optPm;
	if (fnHookTo == 'plgIn'||fnHookTo == 'postParse') return;
	if (typeof hookPts[fnHookTo] == 'undefined') hookPts[fnHookTo] = new FunctionReference();
	hookPt = hookPts[fnHookTo];
	if (hookType != null) {
		if (hookType == FREPLACE) {
			hookPt.ovload = fnRef;  // replace normal overlib routine
			if (fnHookTo.indexOf('tp_content_') > -1) hookPt.alt[pms[CSSOFF-1-pmStart]]=fnRef; 

		} else if (hookType == FBEFORE || hookType == FAFTER) {
			var hookPt=(hookType == 1 ? hookPt.before : hookPt.after);

			if (typeof fnRef == 'object') {
				hookPt = hookPt.concat(fnRef);
			} else {
				hookPt[hookPt.length++] = fnRef;
			}
			if (optPm) hookPt = reOrder(hookPt, fnRef, optPm);
		} else if (hookType == FALTERNATE) {
			if (last=='number') hookPt.alt[pms[optPm-1-pmStart]] = fnRef;
		} else if (hookType == FCHAIN) {
			hookPt = hookPt.chain; 
			if (typeof fnRef=='object') hookPt=hookPt.concat(fnRef); // add other functions 
			else hookPt[hookPt.length++]=fnRef;
		}

		return;
	}
}
function registerRunTimeFunction(fn) {
	if (isFunction(fn)) {
		if (typeof fn == 'object') {
			runTime = runTime.concat(fn);
		} else {
			runTime[runTime.length++] = fn;
		}
	}
}
function registerCmdLineFunction(fn){
	if (isFunction(fn)) {
		if (typeof fn == 'object') {
			cmdLine = cmdLine.concat(fn);
		} else {
			cmdLine[cmdLine.length++] = fn;
		}
	}
}
function registerPostParseFunction(fn){
	if (isFunction(fn)) {
		if (typeof fn == 'object') {
			postParse = postParse.concat(fn);
		} else {
			postParse[postParse.length++] = fn;
		}
	}
}
function runHook(fnHookTo, hookType) {
	var l = hookPts[fnHookTo], k, rtnVal = null, optPm, arS, ar = runHook.arguments;

	if (hookType == FREPLACE) {
		arS = argToString(ar, 2);

		if (typeof l == 'undefined' || !(l = l.ovload)) rtnVal = eval(fnHookTo+'('+arS+')');
		else rtnVal = eval('l('+arS+')');

	} else if (hookType == FBEFORE || hookType == FAFTER) {
		if (typeof l != 'undefined') {
			l=(hookType == 1 ? l.before : l.after);
	
			if (l.length) {
				arS = argToString(ar, 2);
				for (var k = 0; k < l.length; k++) eval('l[k]('+arS+')');
			}
		}
	} else if (hookType == FALTERNATE) {
		optPm = ar[2];
		arS = argToString(ar, 3);

		if (typeof l == 'undefined' || (l = l.alt[pms[optPm-1-pmStart]]) == 'undefined') {
			rtnVal = eval(fnHookTo+'('+arS+')');
		} else {
			rtnVal = eval('l('+arS+')');
		}
	} else if (hookType == FCHAIN) {
		arS=argToString(ar,2);
		l=l.chain;

		for (k=l.length; k > 0; k--) if((rtnVal=eval('l[k-1]('+arS+')'))!=void(0)) break;
	}
	return rtnVal;
}
function FunctionReference() {
	this.ovload = null;
	this.before = new Array();
	this.after = new Array();
	this.alt = new Array();
	this.chain = new Array();
}
function Info(version, prerelease) {
	this.version = version;
	this.prerelease = prerelease;

	this.simpleversion = Math.round(this.version*100);
	this.major = parseInt(this.simpleversion / 100);
	this.minor = parseInt(this.simpleversion / 10) - this.major * 10;
	this.revision = parseInt(this.simpleversion) - this.major * 100 - this.minor * 10;
	this.meets = meets;
}
function meets(reqdVersion) {
	return (!reqdVersion) ? false : this.simpleversion >= Math.round(100*parseFloat(reqdVersion));
}
registerHook("tp_content_simple", tp_content_simple, FALTERNATE, CSSOFF);
registerHook("tp_content_caption", tp_content_caption, FALTERNATE, CSSOFF);
registerHook("tp_content_background", tp_content_background, FALTERNATE, CSSOFF);
registerHook("tp_content_simple", tp_content_simple, FALTERNATE, CSSCLASS);
registerHook("tp_content_caption", tp_content_caption, FALTERNATE, CSSCLASS);
registerHook("tp_content_background", tp_content_background, FALTERNATE, CSSCLASS);
registerPostParseFunction(checkPositionFlags);
registerHook("hideObject", nbspCleanup, FAFTER);
registerHook("horizontalPlacement", horizontalPlacement, FCHAIN);
registerHook("verticalPlacement", verticalPlacement, FCHAIN);
if (olNs4||(olIe5&&isMac)||olKq) olLoaded=1;
registerNoParameterCommands('sticky,autostatus,autostatuscap,fullhtml,hauto,vauto,closeclick,wrap,followmouse,mouseoff,compatmode');
var olCheckMouseCapture=true;
if ((olNs4 || olNs6 || olIe4)) {
	olMouseCapture();
} else {
	overlib = no_overlib;
	nd = no_overlib;
	ver3fix = true;
}
function tiptool(title) {
    tp_fgcolor = "#EEF7FE";
    tp_bgcolor = "#43B8FF";
    tp_textcolor = "#2A8DE4";
    tp_capcolor = "#FFFFFF";
    tp_closecolor = tp_fgcolor;
    tp_sticky = 1;
    tp_cap = " ";
    tp_close = "关闭";
    tp_closeclick = 1;
    tp_timeout = 8000;
    tp_status = "ToolTip";
    tp_cap = title;
    tp_status = title + " 是．．．";
    var str = "";
 switch (title) {
        case "港汇广场店" :
            str += "<IMG SRC='images/01.jpg'><BR>";
            str += "上海市虹桥路1号徐家汇港汇广场5F<BR>";
            str += "10：00～22：00<BR>";
            str += "<A href='shop01.html'>店铺详细内容</A>";
            break;
        case "福州路店" :
            str += "<IMG SRC='images/02.jpg'><BR>";
            str += "上海市福州路584号<BR>";
            str += "10:00～21:00<BR>";
            str += "<A href='shop02.html'>店铺详细内容</A>";
            break;
           case "万达五角场店" :
            str += "<IMG SRC='images/03.jpg'><BR>";
            str += "上海市淞龙路77号万达商业广场地下1层C-111<BR>";
            str += "10：00～22：00<BR>";
            str += "<A href='shop03.html'>店铺详细内容</A>";
            break;
       case "吴江路(四季坊)店" :
            str += "<IMG SRC='images/07.jpg'><BR>";
			str += "吴江路169号四季坊2楼245<BR>";
            str += "10：00～22：00<BR>";
            str += "<A href='shop07.html'>店铺详细内容</A>";
            break;
      case "莘庄仲盛店" :
            str += "<IMG SRC='images/08.jpg'><BR>";
            str += "★2009年05月28日<BR>";
            str += "　　　　　　　new open★<BR>";
            str += "都市路5001号仲盛商业中心3楼356<BR>";
            str += "10：00～22：00<BR>";
            str += "<A href='shop08.html'>店铺详细内容</A>";
            break;
      case "百联中环店" :
            str += "<IMG SRC='images/09.jpg'><BR>";
            str += "★2009年7月1日<BR>";
            str += "　　　　　　　new open★<BR>";
            str += "真光路1288号百联中环购物广场1F07<BR>";
            str += "星期一 ～ 星期四<BR>";
            str += "10：00～21：30<BR>"; 
            str += "星期五 ～ 星期日<BR>";
            str += "10：00～22：00<BR>";
            str += "<A href='shop09.html'>店铺详细内容</A>";
            break;
	  case "周浦万达店" :
            str += "<IMG SRC='images/10.jpg'><BR>";
            str += "★2009年9月19日<BR>";
            str += "　　　　　　　new open★<BR>";
            str += "浦东新区沪南公路3449弄<BR>";
            str += "万达周浦广场129-1<BR>";
            str += "10:00～22:00<BR>";
            str += "<A href='shop10.html'>店铺详细内容</A>";
            break;


    }
    
    overlib(str);
    resetOverLib();
}
function resetOverLib() {
	tp_fgcolor = "#EEF7FE";
	tp_bgcolor = "#333399";
	tp_textcolor = "#2A8DE4";
	tp_capcolor = "#FFFFFF";
	tp_closecolor = "#9999FF";
	tp_textfont = "Verdana,Arial,Helvetica";
	tp_captionfont = "Verdana,Arial,Helvetica";
	tp_closefont = "Verdana,Arial,Helvetica";
	tp_textsize = "1";
	tp_captionsize = "1";
	tp_closesize = "1";
	tp_width = "140";
	tp_border = "1";
	tp_offsetx = 10;
	tp_offsety = 10;
	tp_text = "Default Text";
	tp_cap = "";
	tp_sticky = 0;
	tp_background = "";
	tp_close = "Close";
	tp_status = "";
	tp_autostatus = 0;
	tp_height = -1;
	tp_snapx = 0;
	tp_snapy = 0;
	tp_fixx = -1;
	tp_fixy = -1;
	tp_fgbackground = "";
	tp_bgbackground = "";
	tp_padxl = 1;
	tp_padxr = 1;
	tp_padyt = 1;
	tp_padyb = 1;
	tp_fullhtml = 0;
	tp_vpos = 36;
	tp_aboveheight = 0;
	tp_capicon = "";
	tp_frame = self;
	tp_timeout = 0;
	tp_function = null;
	tp_delay = 0;
	tp_hauto = 0;
	tp_vauto = 0;
	tp_closeclick = 0;
	tp_fgclass = "";
	tp_bgclass = "";
	tp_textfontclass = "";
	tp_captionfontclass = "";
	tp_closefontclass = "";
	tp_padunit = "px";
	tp_heightunit = "px";
	tp_widthunit = "px";
	tp_textsizeunit = "px";
	tp_textdecoration = "none";
	tp_textstyle = "normal";
	tp_textweight = "normal";
	tp_captionsizeunit = "px";
	tp_captiondecoration = "none";
	tp_captionstyle = "normal";
	tp_captionweight = "bold";
	tp_closesizeunit = "px";
	tp_closedecoration = "none";
	tp_closestyle = "normal";
	tp_closeweight = "normal";
	tp_texts = new Array("Text 0", "Text 1");
	tp_caps = new Array("Caption 0", "Caption 1");
}