function resetSearchBox(box){if(box.spireVisited)return;box.spireVisited=true;box.value='';box.style.textIndent='4px';}
function findTable(table){while((table.localName||table.tagName).toLowerCase()!='table'){table=table.parentNode;}
return table;}
function setClassHoverTable(node){if(!node.table)node.table=findTable(node);var cellIndex=node.cellIndex;setClassHover(node,'hoverCell');setClassHover(node.parentNode,'hoverRow');for(var row=0;row<node.table.rows.length;row++){setClassHover(node.table.rows[row].cells[cellIndex],'hoverCol');}}
function unsetClassHoverTable(node){if(!node.table)node.table=findTable(node);var cellIndex=node.cellIndex;unsetClassHover(node,'hoverCell');unsetClassHover(node.parentNode,'hoverRow');for(var row=0;row<node.table.rows.length;row++){unsetClassHover(node.table.rows[row].cells[cellIndex],'hoverCol');}}
function setClassHover(node,sClass){if(!node)return;node.className=(node.className||node.getAttribute('class'))+' '+sClass;node.setAttribute('class',node.className);}
function unsetClassHover(node,sClass){if(!node)return;node.className=(node.className||node.getAttribute('class')).replace(new RegExp(" "+sClass),'');node.setAttribute('class',node.className);}
function LoadFlash(elementId,url,w,h){var e=document.getElementById(elementId);e.innerHTML='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+w+'" height="'+h+'" align="middle">'+'<param name="allowScriptAccess" value="sameDomain" />'+'<param name="movie" value="'+url+'" />'+'<param name="quality" value="high" />'+'<param value="transparent" name="wmode"/>'+'<embed src="'+url+'" quality="high" width="'+w+'" wmode="transparent" height="'+h+'" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" />'+'</object>';}
function setFlashCookie(name,value){name='flash_'+name;var expiration=3600*24*30;var path='/';var domain=document.location.host.replace(/^www.?\./,'');var secure=false;var expirationDate;if(expiration){expirationDate=new Date();expirationDate.setTime(expirationDate.getTime()+expiration);}
document.cookie=name+"="+escape(value)+((expirationDate)?"; expires="+expirationDate.toGMTString():"")+(path?"; path="+path:"")+((domain)?"; domain="+domain:"")+((secure)?"; secure":"");}
function getFlashCookie(name){name='flash_'+name;var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;while(i<clen){var j=i+alen;if(document.cookie.substring(i,j)==arg)
return _getCookieVal(j);i=document.cookie.indexOf(" ",i)+1;if(i==0)break;}
return null;}
function _getCookieVal(offset){var endstr=document.cookie.indexOf(";",offset);if(endstr==-1)
endstr=document.cookie.length;return unescape(document.cookie.substring(offset,endstr));}
function deleteFlashCookie(name){var path='/';var domain=document.location.host.replace(/^www.?\./,'');if(getFlashCookie(name)){document.cookie='flash_'+name+"="+((path)?"; path="+path:"")+((domain)?"; domain="+domain:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT";}}
function compare(){var d=document.getElementById('compare'+this.value);if(d){if(this.checked){d.className=d.className+' ecs-compare';}else{d.className=d.className.replace(/\s?ecs-compare/g,'');}}}
function toCenter(el){var bl=document.getElementById("blackOut");el.style.display='block';bl.style.display='block';el.style.position="absolute";if(window.innerWidth){var screenMaxW=window.innerWidth;var screenMaxH=window.innerHeight;}else if(document.documentElement&&document.documentElement.clientWidth){var screenMaxH=document.documentElement.clientHeight;var screenMaxW=document.documentElement.clientWidth;}else if(document.body){var screenMaxW=document.body.clientWidth;var screenMaxH=document.body.clientHeight;}
var x=(screenMaxW-el.clientWidth)/2;var y=(screenMaxH-el.clientHeight)/2;if(document.all){iebody=(document.compatMode=="CSS1Compat")?document.documentElement:document.body;y=y+iebody.scrollTop;bl.style.height=iebody.scrollWidth;}else{el.style.position="fixed";bl.style.position="fixed";}
el.style.left=x+'px';el.style.top=y+'px';}

function LoadFlash(elementId, url, w, h) {
	var e = document.getElementById(elementId);
	e.innerHTML = 
	'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+w+'" height="'+h+'" align="middle">'+
	'<param name="allowScriptAccess" value="sameDomain" />'+
	'<param name="movie" value="'+url+'" />'+
	'<param name="quality" value="high" />'+
	'<param value="transparent" name="wmode"/>'+
	'<embed src="'+url+'" quality="high" width="'+w+'" wmode="transparent" height="'+h+'" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" />'+
	'</object>';
}