/*
  ===================================================================================
  COPYRIGHT (c) 2001, 2002 BY
  theScreener.com SA, Nyon, SWITZERLAND
  ===================================================================================
  
  This software is the property of theScreener.com SA.
  This software or any  other copies  thereof may not  be provided, copied or
  othervise  made  available to any  person  without  the written  permission
  of theScreener.com SA.
  ===================================================================================
  
  MODULE :        
  VERSION:        2.3.0
  AUTHORS:        I. Moretti at theScreener.com SA, Nyon
  CREATION DATE:  15-Sep-02
  LAST REVISION:  05-Apr-06/VPZ
  ===================================================================================
*/
var isW3C = document.getElementById; var isNS = isW3C ? false : document.layers; var isIE = isW3C ? false : document.all;
var isShowOptions = false;
function getLayer(psLayer) { if (isW3C) { return document.getElementById(psLayer); } else if (isNS) { return document.layers[psLayer]; } else if (isIE) { return document.all[psLayer]; } return false; }
function showLayer(pLayer, psHTML, piLeft, piTop, pHideItems) { if (isShowOptions) hideLayer('layOptions'); if (isW3C) { pLayer.innerHTML = psHTML; pLayer.style.left = piLeft + 'px'; pLayer.style.top = piTop + 'px'; pLayer.style.visibility = 'visible'; } else if (isNS) { pLayer.document.open(); pLayer.document.write(psHTML); pLayer.document.close(); pLayer.left = piLeft + 'px'; pLayer.top = piTop + 'px'; pLayer.visibility = 'show'; } else if (isIE) { pLayer.innerHTML = psHTML; pLayer.style.left = piLeft + 'px'; pLayer.style.top = piTop + 'px'; pLayer.style.visibility = 'visible'; } if (showLayer.arguments.length >= 5) { if (pHideItems) showFormItems(false, piLeft, piTop, pLayer.offsetWidth, pLayer.offsetHeight); } }
function hideLayer(psLayer, pInfoLayer) { var isHidingInfoLayer = false; if (hideLayer.arguments.length >=2) isHidingInfoLayer = pInfoLayer; var oLayer = getLayer(psLayer); if (isW3C || isIE) { oLayer.style.visibility = "hidden"; } else if (isNS) { oLayer.visibility = "hide"; } /*if (!(isShowOptions && isHidingInfoLayer)) {*/ showFormItems(true); /*}*/ }
function showFormItems(pfShow, piLeft, piTop, piWidth, piHeight) { var oItem; var rLayer, rControl; if (! pfShow) { rLayer = new Rect(piLeft, piTop, piWidth, piHeight); } for (var i = 0; i < document.forms.length; i++) { for (var j = 0; j < document.forms[i].length; j++) { oItem = document.forms[i][j]; if (pfShow) { if (!(oItem.name.length > 5 && oItem.name.substring(oItem.name.length - 5, oItem.name.length - 2) == '_df') && !(oItem.name.length > 7 && oItem.name.substring(oItem.name.length - 7, oItem.name.length) == '_hidden')) { if(oItem.name == 'cmd_delwl_hidden') { alert(oItem.name.length); alert(oItem.name.substring(oItem.name.length - 7, oItem.name.length)); } oItem.style.visibility = 'visible'; } } else { rControl = new Rect(getRealLeft(oItem), getRealTop(oItem), oItem.offsetWidth, oItem.offsetHeight); if (rControl.rectIntersects(rLayer)) { if (!(oItem.name.length > 5 && oItem.name.substring(oItem.name.length - 5, oItem.name.length - 2) == '_df')) { oItem.style.visibility = 'hidden'; } } } } } }
function Rect(left, top, width, height) { this.left = left; this.top = top; this.width = width; this.height = height; this.right = left + width; this.bottom = top + height; this.topLeft = top << 16 | left; this.botRight = this.bottom << 16 | this.right; this.ptInside = function(x, y) { var pt = y << 16 | x; return (((pt - this.topLeft) & 0x80008000) | ((this.botRight - pt ) & 0x80008000)) == 0; }; this.rectInside = function(compareR) { return (((compareR.topLeft - this.topLeft) & 0x80008000) | ((this.botRight - compareR.botRight) & 0x80008000)) == 0; }; this.rectIntersects = function(compareR) { var r1 = new Rect(this.left, this.top, compareR.right - this.left, compareR.bottom - this.top); var r2 = new Rect(compareR.left, compareR.top, this.right - compareR.left, this.bottom - compareR.top); return (r1.width > 0 && r2.width > 0 && r1.height > 0 && r2.height > 0); } }
function getRealLeft(psID) { xPos = eval(psID).offsetLeft; tempEl = eval(psID).offsetParent; while (tempEl != null) { xPos += tempEl.offsetLeft; tempEl = tempEl.offsetParent; } return xPos; }
function getRealTop(psID) { yPos = eval(psID).offsetTop; tempEl = eval(psID).offsetParent; while (tempEl != null) { yPos += tempEl.offsetTop; tempEl = tempEl.offsetParent; } return yPos; }
function getMouseCoords(e,coord) { if( !e ) { e = window.event; } if( !e || ( typeof( e.pageX ) != 'number' && typeof( e.clientX ) != 'number' ) ) { return 0; } if( typeof( e.pageX ) == 'number' ) { var xcoord = e.pageX; var ycoord = e.pageY; } else { var xcoord = e.clientX; var ycoord = e.clientY; if( !( ( window.navigator.userAgent.indexOf( 'Opera' ) + 1 ) || ( window.ScriptEngine && ScriptEngine().indexOf( 'InScript' ) + 1 ) || window.navigator.vendor == 'KDE' ) ) { if( document.documentElement && ( document.documentElement.scrollTop || document.documentElement.scrollLeft ) ) { xcoord += document.documentElement.scrollLeft; ycoord += document.documentElement.scrollTop; } else if( document.body && ( document.body.scrollTop || document.body.scrollLeft ) ) { xcoord += document.body.scrollLeft; ycoord += document.body.scrollTop; } } } if (coord == 'x') return xcoord; else if (coord == 'y') return ycoord; else return 0; }
function loadProfile(pCtrl) { var sURL =''; var iEnd = 0; var frm = pCtrl.form; var sPrValue = pCtrl.options[pCtrl.selectedIndex].value; var sPathName = document.location.href; iEnd = sPathName.indexOf('?'); if (iEnd > -1) {sPathName = sPathName.substring(0, iEnd);} var sSearch = document.location.search; var sName = pCtrl.name + '='; if (sSearch.length > 1) { var iStart = sSearch.indexOf(sName); if (iStart > -1) { iStart = iStart+ sName.length; iEnd = sSearch.indexOf('&', iStart); if (iEnd == -1) {sSearch = sSearch.substring(0, iStart) + sPrValue;} else {sSearch = sSearch.substring(0, iStart) + sPrValue + sSearch.substring(iEnd);} sURL = sPathName + sSearch; } else { if (sSearch.charAt(sSearch.length -1) == "&") { sURL = sPathName + sSearch + sName + sPrValue; } else { sURL = sPathName + sSearch + '&' + sName + sPrValue; } } } else { sURL = sPathName + '?' + sName + sPrValue; } document.location.replace(sURL); }
function logOff(pLang) { var sMsg = ''; if (pLang == 'en') { sMsg = 'Are you sure you want to log out?'; } return window.confirm('\n' + sMsg); }
function confBox(psDelMsg, psDelMsg2, intCount) { if (window.confirm(psDelMsg)==false) { return false; } else { if (intCount != 'undefined') { if (intCount > 0) { return window.confirm(psDelMsg2); } } } return true; }
function popWindow_hp(psFile, psPath) { var winHP; var sURL = ''; if (popWindow_hp.arguments.length > 1) { sURL = psPath + psFile + '.htm'; } else { sURL = psFile + '.htm'; } var features = 'menubar=no,status=no,scrollbars=yes,resizable=yes,width=666,height=520,left=0,top=0'; eval(winHP + '=window.open(\'' + sURL + '\',\'winHP\',\'' + features+'\')'); eval(winHP + '.creator = self'); if (window.focus) { eval(winHP + '.focus()'); } }
function popParamWindow(psFile, psPath, pMenuBar, pStatus, pScrollBars, pResizable, pWidth, pHeight, pLeft, pTop) { var paramWin; var sURL = psPath + psFile; var features = 'menubar=' + pMenuBar + ',status=' + pStatus + ',scrollbars=' + pScrollBars + ',resizable=' + pResizable + ',width=' + pWidth + ',height=' + pHeight + ',left=' + pLeft + ',top=' + pTop; eval(paramWin + '=window.open(\'' + sURL + '\',\'paramWin\',\'' + features + '\')'); eval(paramWin + '.creator = self'); if (window.focus) { eval(paramWin + '.focus()'); } }
function popPwdEdit(pHttpsPath) { chgpwdTimer = setTimeout("window.location.href = 'preferences.asp?pView=account';", 5000); var pwdWin; var sURL; if (typeof(pHttpsPath) == 'string') sURL = pHttpsPath + 'chgpwd.asp'; else sURL = 'chgpwd.asp'; var features = 'menubar=no,status=yes,scrollbars=no,resizable=no,width=400,height=200,left=' + ((screen.width - 640) / 2) + ',top=' + ((screen.height - 480) / 2); eval(pwdWin + '=window.open(\'' + sURL + '\',\'pwdWin\',\'' + features + '\')'); if (typeof(pHttpsPath) != 'string') eval(pwdWin + '.creator = self'); if (window.focus && typeof(pwdWin) != 'undefined') { eval(pwdWin + '.focus()'); } return false; }
function changeDate() { var conDate = 'analysisdate'; var sSearch = window.location.search; var iPosStart = sSearch.indexOf(conDate + '='); if (iPosStart > 0) { var iPosEnd = sSearch.indexOf('&', iPosStart + 1); var oDates = document.forms[0][conDate]; var sFind = sSearch.substring(iPosStart, iPosEnd); var sReplace = conDate + '=' + escape(oDates.options[oDates.selectedIndex].value); var sUrl = window.location.pathname + sSearch.replace(sFind, sReplace); window.location.href = sUrl; } }
function newDate() { var conDate = 'analysisdate'; var sSearch = window.location.search; var iPosStart = sSearch.indexOf(conDate + '='); if (iPosStart > 0) { var iPosEnd = sSearch.indexOf('&', iPosStart + 1); /*var oDates = document.forms[0][conDate];*/ for (var iFrmIdx = 0; iFrmIdx < document.forms.length; iFrmIdx++) { var oDates = document.forms[iFrmIdx][conDate]; if (typeof(oDates) == 'object') break; } var sFind = sSearch.substring(iPosStart, iPosEnd); var sReplace = conDate + '=' + escape(oDates.options[oDates.selectedIndex].value); var sUrl = window.location.pathname + sSearch.replace(sFind, sReplace); window.location.href = sUrl; } else { alert('yep'); var oDates = document.forms[0][conDate]; var sReplace = conDate + '=' + escape(oDates.options[oDates.selectedIndex].value); var sUrl = window.location.href + '&'+sReplace+'&'; window.location.href = sUrl; } } function newDate(pCtrl) { var conDate = 'analysisdate'; var sSearch = window.location.search; var iPosStart = sSearch.indexOf(conDate + '='); if (iPosStart > 0) { var iPosEnd = sSearch.indexOf('&', iPosStart + 1); var sFind = sSearch.substring(iPosStart, iPosEnd); var sReplace = conDate + '=' + escape(pCtrl.options[pCtrl.selectedIndex].value); var sUrl = window.location.pathname + sSearch.replace(sFind, sReplace); window.location.href = sUrl; } else { var sReplace = conDate + '=' + escape(pCtrl.options[pCtrl.selectedIndex].value); var sUrl = window.location.href + '&'+sReplace+'&'; window.location.href = sUrl; } }
function changeDate(pCtrl) { /*alert(pCtrl.form.name);*/ /*alert(document.forms[0].name);*/ var frm = pCtrl.form; /*var frm = document.forms[0];*/ var oaFld = new Array(frm.cmdDraw, frm.cmdDrawCompare); var oFld; var i = 0; var j = 0; for (j = 0; j < oaFld.length; j++) { oFld = oaFld[j]; if (typeof(oFld) != 'undefined') { for (i = 0; i < oFld.length; i++) { if (oFld[i].value == '') { oFld[i].value = '1'; break; } } } } frm.submit(); }
function changeUrlParam(pCtrl) { var frm = pCtrl.form; var oaFld = new Array(frm.cmdDraw, frm.cmdDrawCompare); var oFld; var i = 0; var j = 0; for (j = 0; j < oaFld.length; j++) { oFld = oaFld[j]; if (typeof(oFld) != 'undefined') { for (i = 0; i < oFld.length; i++) { if (oFld[i].value == '') { oFld[i].value = '1'; break; } } } } frm.submit(); }
function dwnldPDF(psParam) { var winPDF; var sURL = 'dwnld-pdf.asp' + '?pView=NA&' + psParam; var iScreenHeight = window.screen.height; var iScreenWidth = window.screen.width; var iWinHeight = 350; var iWinWidth = 380; var iWinTop = (iScreenHeight / 2) - (iWinHeight / 2) - 40; var iWinLeft = (iScreenWidth / 2) - (iWinWidth / 2); var sFeatures = 'menubar=no,resizable=no,status=no,toolbar=no,scrollbars=no,width=' + iWinWidth + ',height=' + iWinHeight + ',top=' + iWinTop + ',left=' + iWinLeft; eval(winPDF + "=window.open('" + sURL + "','winPDF','" + sFeatures+"')"); eval(winPDF + ".creator = self"); if (window.focus) { eval(winPDF + ".focus()"); } }
function checkSelected (psFrm, psCtl, pbDel, psType, psMsg, paId) { var sFormName; var frmIdx; var oFrm; var oCtl; if ((psFrm.indexOf('[') == psFrm.lastIndexOf('[')) && (psFrm.indexOf(']') == psFrm.lastIndexOf(']')) && (psFrm.indexOf('[') < psFrm.indexOf(']'))) { sFormName = psFrm.substring(0, psFrm.indexOf('[')); frmIdx = psFrm.substring(psFrm.indexOf('[') + 1, psFrm.indexOf(']')); if (isNaN(frmIdx)) frmIdx = false; } else { sFormName = psFrm; frmIdx = false; } if (!frmIdx || !(!document.layers && document.all)) { oFrm = document.forms[sFormName]; } else { oFrm = document.forms[sFormName][frmIdx]; } if (isW3C) oCtl = document.getElementsByName(psCtl); else if(isIE) oCtl = document.all[psCtl]; else oCtl = oFrm.elements[psCtl]; switch (psType) { case 'href': var vSubmitForm = confBox(psMsg); if (vSubmitForm) { for (var q = 0; q < oCtl.length; q++) { if (oCtl[q].value == paId[1]) oCtl[q].checked = true; else oCtl[q].checked = false; } oFrm.submit(); } break; case 'checkbox': var bChecked = false; var vCtlLen = ((oCtl.length == undefined) ? 1 : oCtl.length); for(var i = 0; i < vCtlLen; i++) { if (oCtl[i].checked) bChecked = true; } if (bChecked) { return confBox(psMsg); } else { alert('Nothing has been selected...'); return false; } break; case 'selection': var iIdx = oCtl.selectedIndex; switch (typeof(oCtl.options[iIdx])) { case 'unknown': alert('Nothing has been selected...'); return false; break; case 'undefined': alert('Nothing has been selected...'); return false; break; case 'object': if (oCtl.options[iIdx].value.length > 0) { switch (pbDel) { case false: return true; break; case true: return confBox(psMsg); break; default: alert('Unknown error occured.\nPlease contact support.'); return false; break; } } else { alert('Identification failure.\nPlease contact support.'); return false; } break; default: alert('Unknown error occured.\nPlease contact support.'); return false; break; } return false; break; default: alert('Unknown field type.\nPlease contact support.'); return false; break; } }
function handleEnter (psBtnId) { if (event.keyCode==13) { var oBtnToClick = document.getElementById(psBtnId); var oSearchTag = document.getElementById('search_tag_id'); var oSearchBtn = document.getElementById('search_btn_id'); var isSearchBox = oSearchTag != null && oSearchBtn != null; if (isSearchBox) { if (oSearchTag.value.length > 0) { oSearchBtn.click(); return false; } else if (oBtnToClick != null) { oBtnToClick.click(); return false; } else return false; } else { if (oBtnToClick != null) { oBtnToClick.click(); return false; } else return false; } } else return true; }

		function dwnldBankPfPDF(psParam)
		{
			var winPDF;
			var sURL = 'dwnld-bank_pf-pdf.asp' + '?' + psParam;
			var iScreenHeight = window.screen.height;
			var iScreenWidth = window.screen.width;
			var iWinHeight = 350;
			var iWinWidth = 380;
			var iWinTop = (iScreenHeight / 2) - (iWinHeight / 2) - 40;
			var iWinLeft = (iScreenWidth / 2) - (iWinWidth / 2);
			var sFeatures = 'menubar=no,resizable=no,status=no,toolbar=no,scrollbars=no,width=' 
				+ iWinWidth + ',height=' + iWinHeight + ',top=' + iWinTop + ',left=' + iWinLeft;
			eval(winPDF + "=window.open('" + sURL + "','winPDF','" + sFeatures+"')");
			eval(winPDF + ".creator = self");
			if (window.focus)
			{
				eval(winPDF + ".focus()");
			}
		}
		
		
		function dwnldUserPfPDF(psParam)
		{
			var winPDF;
			var sURL = 'dwnld-user_pf-pdf.asp' + '?' + psParam;
			var iScreenHeight = window.screen.height;
			var iScreenWidth = window.screen.width;
			var iWinHeight = 350;
			var iWinWidth = 380;
			var iWinTop = (iScreenHeight / 2) - (iWinHeight / 2) - 40;
			var iWinLeft = (iScreenWidth / 2) - (iWinWidth / 2);
			var sFeatures = 'menubar=no,resizable=no,status=no,toolbar=no,scrollbars=no,width=' 
				+ iWinWidth + ',height=' + iWinHeight + ',top=' + iWinTop + ',left=' + iWinLeft;
			eval(winPDF + "=window.open('" + sURL + "','winPDF','" + sFeatures+"')");
			eval(winPDF + ".creator = self");
			if (window.focus)
			{
				eval(winPDF + ".focus()");
			}
		}
	
		function dwnldTSCPfPDF(psParam)
		{
			var winPDF;
			var sURL = 'dwnld-tsc_pf-pdf.asp' + '?' + psParam;
			var iScreenHeight = window.screen.height;
			var iScreenWidth = window.screen.width;
			var iWinHeight = 350;
			var iWinWidth = 380;
			var iWinTop = (iScreenHeight / 2) - (iWinHeight / 2) - 40;
			var iWinLeft = (iScreenWidth / 2) - (iWinWidth / 2);
			var sFeatures = 'menubar=no,resizable=no,status=no,toolbar=no,scrollbars=no,width=' 
				+ iWinWidth + ',height=' + iWinHeight + ',top=' + iWinTop + ',left=' + iWinLeft;
			eval(winPDF + "=window.open('" + sURL + "','winPDF','" + sFeatures+"')");
			eval(winPDF + ".creator = self");
			if (window.focus)
			{
				eval(winPDF + ".focus()");
			}
		}
  
  function dwnldPDFReport(psParam, rptType)
  {
  var winPDF;
  var sURL;

  switch(rptType)
  {
  case 'agg' :
  sURL = 'dwnld-aggregate-pdf.asp';
  break;
  case 'idx' :
  sURL = 'dwnld-index-pdf.asp';
  break;
  case 'dbchanges' :
  sURL = 'dwnld-DbChanges-pdf.asp';
  break;
  case 'tactical' :
  sURL = 'dwnld-tactical-pdf.asp';
  break;
  case 'bnd' :
  sURL = 'dwnld-bonds-pdf.asp';
  break;
  }

  sURL += '?' + psParam;
  var iScreenHeight = window.screen.height;
  var iScreenWidth = window.screen.width;
  var iWinHeight = 350;
  var iWinWidth = 380;
  var iWinTop = (iScreenHeight / 2) - (iWinHeight / 2) - 40;
  var iWinLeft = (iScreenWidth / 2) - (iWinWidth / 2);
  var sFeatures = 'menubar=no,resizable=no,status=no,toolbar=no,scrollbars=no,width='
  + iWinWidth + ',height=' + iWinHeight + ',top=' + iWinTop + ',left=' + iWinLeft;
  eval(winPDF + "=window.open('" + sURL + "','winPDF','" + sFeatures+"')");
  eval(winPDF + ".creator = self");
  if (window.focus)
  {
  eval(winPDF + ".focus()");
  }
  }
  String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); }
function checkEmail(psEmail) { var regExp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; if (regExp.test(psEmail)) return true; else return false; }
function dwnld (psParam, psType) { var winPDF; var sAspFile; var sTitle; if (typeof(psType) != 'string') psType = 'NA'; switch (psType) { case 'pfrpt': sAspFile = 'dwnld.asp'; sTitle = 'Report Download'; break; default: sAspFile = 'dwnld.asp'; sTitle = 'Download'; break; } var sURL = sAspFile + '?' + psParam + '&psDwnldType=' + psType + '&psTitle=' + sTitle + '&done=yes'; var iScreenHeight = window.screen.height; var iScreenWidth = window.screen.width; /*var iWinHeight = window.screen.height; var iWinWidth = window.screen.width; */ /*var iWinHeight = 350; var iWinWidth = 380;*/ var iWinHeight = 480; var iWinWidth = 640; var iWinTop = (iScreenHeight / 2) - (iWinHeight / 2) - 40; var iWinLeft = (iScreenWidth / 2) - (iWinWidth / 2); var sFeatures = 'menubar=no,resizable=yes,status=yes,toolbar=no,scrollbars=no,width=' + iWinWidth + ',height=' + iWinHeight + ',top=' + iWinTop + ',left=' + iWinLeft; eval(winPDF + "=window.open('" + sURL + "','winPDF','" + sFeatures+"')"); /*winPDF = 'test'; alert(eval(winPDF + ".document.title")); winPDF.document.title = 'test';*/ eval(winPDF + ".creator = self"); if (window.focus) { eval(winPDF + ".focus()"); } /*eval(winPDF + ".title = 'test'");*/ }
function confRedirect (psMsg, psHref) { var isRedirect = confBox(psMsg); if (isRedirect) location.href = psHref; }
function setHiddenDTon (pON, psDTonElemID) { var sDTonElemID = 'pDTon'; if (setHiddenDTon.arguments.length > 1) sDTonElemID = psDTonElemID; var oDTon = document.getElementById(sDTonElemID); if (typeof(oDTon) == 'object') { if (pON) oDTon.value = '1'; else oDTon.value = ''; /*alert(oDTon.value);*/ }; };
function clickBtn (psBtnId) { var oBtnToClick = document.getElementById(psBtnId); if (oBtnToClick != null) oBtnToClick.click(); }
function displayGraph(pRequest) { /* alert(pRequest); var newRequest = pRequest.replace("../../..", "..");*/ var newRequest = pRequest; if (AC_FL_RunContent == 0 || DetectFlashVer == 0) { alert("This page requires AC_RunActiveContent.js."); } else { var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision); if(hasRightVersion) { var currentDate = new Date(); var currentTime = currentDate.getTime(); var requestComplete = newRequest.replace("?", "?time="+currentTime+"%26"); requestComplete=requestComplete+"%26chartType=flash"; requestComplete = requestComplete.replace("&", "%26"); /* alert(requestComplete);*/ /* var strFlashVars = "library_path=../../../js/graph/charts_library&xml_source=../../../common/asp/graphData.asp?isin="+pIsin+"%26ccy="+pCcy+"%26market="+pMarket+"%26time="+currentTime; */ var strFlashVars = "library_path=../../../js/graph/charts_library&xml_source="+requestComplete; AC_FL_RunContent( 'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0', 'width', '700', 'height', '300', 'scale', 'noscale', 'salign', 'TL', 'bgcolor', '#FFFFFF', 'wmode', 'opaque', 'movie', '../../../js/graph/charts', 'src', '../../../js/graph/charts', 'FlashVars', strFlashVars, 'id', 'my_chart', 'name', 'my_chart', 'menu', 'true', 'allowFullScreen', 'true', 'allowScriptAccess','sameDomain', 'quality', 'high', 'align', 'middle', 'pluginspage', 'http://www.macromedia.com/go/getflashplayer', 'play', 'true', 'devicefont', 'false' ); } else { var alternateContent = 'This content requires the Adobe Flash Player. ' + 'Get Flash.'; document.write(alternateContent); } } }
function setCookie(c_name, value, expiredays) { var exdate=new Date(); exdate.setDate(exdate.getDate()+expiredays); document.cookie=c_name+ "=" +escape(value)+ ((expiredays==null) ? "" : ";expires="+exdate.toGMTString()); }
function getCookie(c_name) { if (document.cookie.length>0) { c_start=document.cookie.indexOf(c_name + "="); if (c_start!=-1) { c_start=c_start + c_name.length+1; c_end=document.cookie.indexOf(";",c_start); if (c_end==-1) c_end=document.cookie.length; return unescape(document.cookie.substring(c_start,c_end)); } } return ""; }

