// ### Array Helper Functions ### function tiiArrayContains (array, value) { if (array != null) { var al = array.length; for (var i = 0; i < al; i++) { if (array[i] == value) return true; } } return false; } // ### Key=Value; Functions ### function tiiHashKeys(string) { var keys = null; if (string != null) { var hash = string.split(';'); var hl = hash.length - 1; if(hl > 0){ keys = new Array(); for(var i = 0; i < hl; i++){ var data = hash[i].split('='); keys[i] = data[0].replace(' ', ''); } } } return keys; } function tiiHashGet(string, key) { var value = null; if (string != null) { var keyStart = key + '='; var offset = string.indexOf(keyStart); if (offset != -1) { offset += keyStart.length; var end = string.indexOf(';', offset); if (end == -1) { end = string.length; } value = string.substring(offset, end); } } return value; } function tiiHashSet(string, key, value) { var string = tiiHashDelete(string, key); var newValue = key + '=' + value + ';'; if (string != null) newValue = newValue + string; return newValue; } function tiiHashDelete(string, key) { var oldValue = tiiHashGet(string, key); var newString = string; if (oldValue != null) { var search = key + '='; var start = string.indexOf(search); var offset = start + search.length; var end = string.indexOf(';', offset) + 1; if (end == -1) end = string.length; newString = string.slice(0,start) + string.slice(end,string.length); return newString; } return newString; } function tiiGetQueryParamValue(param) { var startIndex; var endIndex; var valueStart; var qs = document.location.search; var detectIndex = qs.indexOf( "?" + param + "=" ); var detectIndex2 = qs.indexOf( "&" + param + "=" ); var key = "&" + param + "="; var keylen = key.length; if (qs.length > 1) { if (detectIndex != -1) { startIndex = detectIndex; } else if (detectIndex2 != -1) { startIndex = detectIndex2; } else { return null; } valueStart = startIndex + keylen; if (qs.indexOf("&", valueStart) != -1) { endIndex = qs.indexOf("&", startIndex + 1) } else { endIndex = qs.length } return (qs.substring(qs.indexOf("=", startIndex) + 1, endIndex)); } return null; } // ### Date/Time Functions ### function tiiDateGetOffsetMinutes(minutes) { var today = new Date(); return today.getTime() + (60000) * minutes;} function tiiDateGetOffsetHours(hours) { var today = new Date(); return today.getTime() + (3600000) * hours; } function tiiDateGetOffsetDays(days) { var today = new Date(); return today.getTime() + (86400000) * days; } function tiiDateGetOffsetWeeks(weeks) { var today = new Date(); return today.getTime() + (604800000) * weeks; } function tiiDateGetOffsetMonths(months) { var today = new Date(); return today.getTime() + (259200000) * months; } function tiiDateGetOffsetYears(years) { var today = new Date(); return today.getTime() + (31536000000) * years; } FlashObject = function(swf, id, w, h, ver, c) { this.swf = swf; this.id = id; this.width = w; this.height = h; this.version = ver || 6; // default to 6 this.align = "middle"; // default to middle this.redirect = ""; this.sq = document.location.search.split("?")[1] || ""; this.altTxt = "Please upgrade your Flash Player."; this.bypassTxt = ""; this.params = new Object(); this.variables = new Object(); if (c) this.color = this.addParam('bgcolor', c); this.addParam('quality', 'high'); // default to high this.doDetect = tiiGetQueryParamValue('tiiDetectFlash'); } FlashObject.prototype.addParam = function(name, value) { this.params[name] = value; } FlashObject.prototype.getParams = function() { return this.params; } FlashObject.prototype.getParam = function(name) { return this.params[name]; } FlashObject.prototype.addVariable = function(name, value) { this.variables[name] = value; } FlashObject.prototype.getVariable = function(name) { return this.variables[name]; } FlashObject.prototype.getVariables = function() { return this.variables; } FlashObject.prototype.getParamTags = function() { var paramTags = ""; for (var param in this.getParams()) { paramTags += ''; } if (paramTags == "") { paramTags = null; } return paramTags; } FlashObject.prototype.getHTML = function() { var flashHTML = ""; if (window.ActiveXObject && navigator.userAgent.indexOf('Mac') == -1) { // PC IE flashHTML += ''; flashHTML += ''; if (this.getParamTags() != null) { flashHTML += this.getParamTags(); } if (this.getVariablePairs() != null) { flashHTML += ''; } flashHTML += ''; } else { // Everyone else flashHTML += '= 3 && result != true; i--){ execScript('on error resume next: result = IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+i+'"))','VBScript'); flashversion = i; } } return flashversion; } function tiiDetectFlash(ver) { if (tiiGetFlashVersion() >= ver) { return true; } else { return false; } } /* add Array.push if needed */ if(Array.prototype.push == null){ Array.prototype.push = function(item){ this[this.length] = item; return this.length; } } var page_height = 0; function popcustom(file,title,w,h,x,y) { popup = window.open(file,title,'width='+ w + ',height='+ h + ',screenX='+ x + ',screenY='+ y + ',scrollbars=0,resizable=1'); if (document.images) {popup.focus();} } function popcustom2(file,title) { popup = window.open(file,title,'width=627,height=400,screenX=20,screenY=20,directories=1,location=1,resizable=1,scrollbars=1,status=1,toolbar=1'); if (document.images) {popup.focus();} } function popcustom3(file,title,w,h,x,y,scroll,resize) { popup = window.open(file,title,'width='+w+',height='+h+',screenX='+x+',screenY='+y+',scrollbars='+scroll+',resizable='+resize); if (document.images) {popup.focus();} } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i