//flash detection object
if(typeof deconcept == "undefined") 			{var deconcept = {};}
if(typeof deconcept.util == "undefined") 			{deconcept.util = {};}
if(typeof deconcept.SWFObjectUtil == "undefined") 	{deconcept.SWFObjectUtil = {};}
deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) 
{
	if (!document.getElementById) 	{return;}
	this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
	this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
	this.params = {};
	this.variables = {};
	this.attributes = [];
	if(swf) 				{this.setAttribute('swf', swf);}
	if(id) 				{this.setAttribute('id', id);}
	if(w) 					{this.setAttribute('width', w);}
	if(h) 					{this.setAttribute('height', h);}
	if(ver) 				{this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split(".")));}
	
	this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
	if (!window.opera && document.all && this.installedVer.major > 7) 
	{
		if (!deconcept.unloadSet) 
		{
			deconcept.SWFObjectUtil.prepUnload = function() {__flash_unloadHandler = function(){}; __flash_savedUnloadHandler = function(){}; window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs);}
			window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);
			deconcept.unloadSet = true;
		}
	}
	if(c) 					{this.addParam('bgcolor', c);}
	var q = quality ? quality : 'high';
	this.addParam('quality', q);
	this.setAttribute('useExpressInstall', false);
	this.setAttribute('doExpressInstall', false);
	var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
	this.setAttribute('xiRedirectUrl', xir);
	this.setAttribute('redirectUrl', '');
	if(redirectUrl) 			{this.setAttribute('redirectUrl', redirectUrl);}
}
deconcept.SWFObject.prototype = 
{
	useExpressInstall: function(path) 
	{
		this.xiSWFPath = !path ? "expressinstall.swf" : path;
		this.setAttribute('useExpressInstall', true);
	},
	setAttribute: function(name, value){this.attributes[name] = value;},
	getAttribute: function(name){return this.attributes[name] || "";},
	addParam: function(name, value){this.params[name] = value;},
	getParams: function(){return this.params;},
	addVariable: function(name, value){this.variables[name] = value;},
	getVariable: function(name){return this.variables[name] || "";},
	getVariables: function(){return this.variables;},
	getVariablePairs: function()
	{
		var variablePairs = [];
		var key;
		var variables = this.getVariables();
		for(key in variables){variablePairs[variablePairs.length] = key +"="+ variables[key];}
		return variablePairs;
	},
	getSWFHTML: function()
	{
		var swfNode = "";
		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length)
		{
			if (this.getAttribute("doExpressInstall")) {this.addVariable("MMplayerType", "PlugIn"); this.setAttribute('swf', this.xiSWFPath);}
			swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ (this.getAttribute('style') || "") +'"';
			swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
			var params = this.getParams();
			 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
			var pairs = this.getVariablePairs().join("&");
			 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
			swfNode += '/>';
		} 
		else 
		{
			if (this.getAttribute("doExpressInstall")) {this.addVariable("MMplayerType", "ActiveX"); this.setAttribute('swf', this.xiSWFPath);}
			swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ (this.getAttribute('style') || "") +'">';
			swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
			var params = this.getParams();
			for(var key in params) {swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';}
			var pairs = this.getVariablePairs().join("&");
			if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
			swfNode += "</object>";
		}
		return swfNode;
	},
	write: function(elementId){
		if(this.getAttribute('useExpressInstall')) 
		{
			var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
			if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) 
			{
				this.setAttribute('doExpressInstall', true);
				this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
				document.title = document.title.slice(0, 47) + " - Flash Player Installation";
				this.addVariable("MMdoctitle", document.title);
			}
		}
		if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version')))
		{
			var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
			n.innerHTML = this.getSWFHTML();
			return true;
		}
		else{if(this.getAttribute('redirectUrl') != "")	{document.location.replace(this.getAttribute('redirectUrl'));}}
		return false;
	}
}
deconcept.SWFObjectUtil.getPlayerVersion = function()
{
	var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
	if(navigator.plugins && navigator.mimeTypes.length)
	{
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) 	{PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));}
	}

	else {try {var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");} catch(e) {try {var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); PlayerVersion = new deconcept.PlayerVersion([6,0,21]); axo.AllowScriptAccess = "always";} catch(e) {if (PlayerVersion.major == 6) {return PlayerVersion;}} try {axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");} catch(e) {}} if (axo != null) {PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
	return PlayerVersion;
}
deconcept.PlayerVersion = function(arrVersion)	{this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0; this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0; this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;}
deconcept.PlayerVersion.prototype.versionIsValid = function(fv)	{if(this.major < fv.major) return false; if(this.major > fv.major) return true; if(this.minor < fv.minor) return false; if(this.minor > fv.minor) return true; if(this.rev < fv.rev) return false; return true;}
deconcept.util = 
{
	getRequestParameter: function(param) 
	{
		var q = document.location.search || document.location.hash;
		if (param == null) {return q;}
		if(q) {var pairs = q.substring(1).split("&"); for (var i=0; i < pairs.length; i++) {if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {return pairs[i].substring((pairs[i].indexOf("=")+1));}}}
		return "";
	}
}
deconcept.SWFObjectUtil.cleanupSWFs = function() 
{
	var objects = document.getElementsByTagName("OBJECT");
	for (var i = objects.length - 1; i >= 0; i--) {objects[i].style.display = 'none'; for (var x in objects[i]) {if (typeof objects[i][x] == 'function') {objects[i][x] = function(){};}}}
}
if (!document.getElementById && document.all) {document.getElementById = function(id) { return document.all[id];}}
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; 
var SWFObject = deconcept.SWFObject;			

/* sample usage
<div id="swf"><img src="/images/shell/noflash_home.jpg" width="760" height="250" border="0" usemap="#home" alt="navigation" /></div>
<script type="text/javascript">
	// <![CDATA[
	var swf = new SWFObject("/images/flash/home.swf", "interior", "760", "250", 7);
	swf.addParam("menu", "false");
	swf.addParam("WMODE", "opaque");
	swf.addVariable("url", "<?=$aURLS[5]["link"]?>");
	swf.write("swf");
	// ]]>
</script>
*/


//end flash detection object -- start home specials dhtml

function showPic (whichpic) 
{
	if (document.getElementById) 
	{
  		document.getElementById('placeholder').src = whichpic.href;
  		if (whichpic.title) 				{document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;} 
		else 						{document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;}
  		return false;
 	} 
	else 
	{
  	return true;
 	}	
}

//end home specials dhtml -- start popup windows
function popUp(URL) 
{
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=560,height=560,left = 312,top = 134');");
}


function popUpNightlife(URL) 
{
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=650,height=450,left = 312,top = 134');");
}

function popUpBeaches(URL) 
{
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=450,height=650,left = 312,top = 134');");
}

function popUpHumpty(URL) 
{
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=450,height=330,left = 312,top = 134');");
}
function openWin(pageSource) 
{
	aWindow=window.open(pageSource,"thewindow","toolbar=no,width=550,height=520,status=no,scrollbars=no,resize=no,resizable=no,menubar=no");
	aWindow.focus();
}

function openQWin(pageSource) 
{
	aWindow=window.open(pageSource,"thewindow","toolbar=no,width=775,height=620,status=no,scrollbars=yes,resize=yes,resizable=yes,menubar=no");
	aWindow.focus();
}

function slideshowWindow(pageSource) //slideshow pop up window
{
	leWindow = window.open(pageSource, 'PhotoTour', 'toolbar=no,width=620,height=500,status=0,location=0,left=15,top=15,scrollbars=0,resizable=0,menubar=0'); 
	leWindow.focus();
}        

//end popups -- start next page functions
function goToNextPage() 
{ 
	PageIndex=document.form_menu.drop_menu.selectedIndex;
	if ((document.form_menu.drop_menu.options[PageIndex].value != "none") && (document.form_menu.drop_menu.options[PageIndex].value.length > 0))
	{ 
		location = document.form_menu.drop_menu.options[PageIndex].value;
	} 
	return true;
} 
function goToNextCalPage() 
{ 
	PageIndex=document.form_menu.calendar04.selectedIndex 
	if (document.form_menu.calendar04.options[PageIndex].value != "none") 
	{ 
		location = document.form_menu.calendar04.options[PageIndex].value 
	} 
	return true;
}

// end pop up windows, start new dropdown navigation menu

var isDOM=document.getElementById?1:0,isIE=document.all?1:0,isNS4=navigator.appName=='Netscape'&&!isDOM?1:0,isOp=self.opera?1:0,isDyn=isDOM||isIE||isNS4;function getRef(i,p){p=!p?document:p.navigator?p.document:p;return isIE?p.all[i]:isDOM?(p.getElementById?p:p.ownerDocument).getElementById(i):isNS4?p.layers[i]:null};function getSty(i,p){var r=getRef(i,p);return r?isNS4?r:r.style:null};if(!self.LayerObj)var LayerObj=new Function('i','p','this.ref=getRef(i,p);this.sty=getSty(i,p);return this');function getLyr(i,p){return new LayerObj(i,p)};function LyrFn(n,f){LayerObj.prototype[n]=new Function('var a=arguments,p=a[0],px=isNS4||isOp?0:"px";with(this){'+f+'}')};LyrFn('x','if(!isNaN(p))sty.left=p+px;else return parseInt(sty.left)');LyrFn('y','if(!isNaN(p))sty.top=p+px;else return parseInt(sty.top)');var aeOL=[];function addEvent(o,n,f,l){var a='addEventListener',h='on'+n,b='',s='';if(o[a]&&!l)return o[a](n,f,false);o._c|=0;if(o[h]){b='_f'+o._c++;o[b]=o[h]}s='_f'+o._c++;o[s]=f;o[h]=function(e){e=e||window.event;var r=true;if(b)r=o[b](e)!=false&&r;r=o[s](e)!=false&&r;return r};aeOL[aeOL.length]={o:o,h:h}};addEvent(window,'unload',function(){for(var i=0;i<aeOL.length;i++)with(aeOL[i]){o[h]=null;for(var c=0;o['_f'+c];c++)o['_f'+c]=null}});function FSMenu(myName,nested,cssProp,cssVis,cssHid){this.myName=myName;this.nested=nested;this.cssProp=cssProp;this.cssVis=cssVis;this.cssHid=cssHid;this.cssLitClass='';this.menus={root:new FSMenuNode('root',true,this)};this.menuToShow=[];this.mtsTimer=null;this.showDelay=0;this.switchDelay=125;this.hideDelay=500;this.showOnClick=0;this.animations=[];this.animSpeed=100;if(isIE&&!isOp)addEvent(window,'unload',new Function(myName+'=null'))};FSMenu.prototype.show=function(mN){with(this){menuToShow.length=arguments.length;for(var i=0;i<arguments.length;i++)menuToShow[i]=arguments[i];clearTimeout(mtsTimer);if(!nested)mtsTimer=setTimeout(myName+'.menus.root.over()',10)}};FSMenu.prototype.hide=function(mN){with(this){clearTimeout(mtsTimer);if(menus[mN])menus[mN].out()}};function FSMenuNode(id,isRoot,obj){this.id=id;this.isRoot=isRoot;this.obj=obj;this.lyr=this.child=this.par=this.timer=this.visible=null;this.args=[];var node=this;this.over=function(evt){with(node)with(obj){if(isNS4&&evt&&lyr.ref)lyr.ref.routeEvent(evt);clearTimeout(timer);clearTimeout(mtsTimer);if(!isRoot&&!visible)node.show();if(menuToShow.length){var a=menuToShow,m=a[0];if(!menus[m]||!menus[m].lyr.ref)menus[m]=new FSMenuNode(m,false,obj);var c=menus[m];if(c==node){menuToShow.length=0;return}clearTimeout(c.timer);if(c!=child&&c.lyr.ref){c.args.length=a.length;for(var i=0;i<a.length;i++)c.args[i]=a[i];var delay=child?switchDelay:showDelay;c.timer=setTimeout('with('+myName+'){menus["'+c.id+'"].par=menus["'+node.id+'"];menus["'+c.id+'"].show()}',delay?delay:1)}menuToShow.length=0}if(!nested&&par)par.over()}};this.out=function(evt){with(node)with(obj){if(isNS4&&evt&&lyr&&lyr.ref)lyr.ref.routeEvent(evt);clearTimeout(timer);if(!isRoot){timer=setTimeout(myName+'.menus["'+id+'"].hide()',hideDelay);if(!nested&&par)par.out()}}};if(this.id!='root')with(this)with(lyr=getLyr(id))if(ref){if(isNS4)ref.captureEvents(Event.MOUSEOVER|Event.MOUSEOUT);addEvent(ref,'mouseover',this.over);addEvent(ref,'mouseout',this.out);if(obj.nested){addEvent(ref,'focus',this.over);addEvent(ref,'click',this.over);addEvent(ref,'blur',this.out)}}};FSMenuNode.prototype.show=function(){with(this)with(obj){if(!lyr||!lyr.ref)return;if(par){if(par.child&&par.child!=this)par.child.hide();par.child=this}var offR=args[1],offX=args[2],offY=args[3],lX=0,lY=0,doX=''+offX!='undefined',doY=''+offY!='undefined';if(self.page&&offR&&(doX||doY)){with(page.elmPos(offR,par.lyr?par.lyr.ref:0))lX=x,lY=y;if(doX)lyr.x(lX+eval(offX));if(doY)lyr.y(lY+eval(offY))}if(offR)lightParent(offR,1);visible=1;if(obj.onshow)obj.onshow(id);setVis(1)}};FSMenuNode.prototype.hide=function(){with(this)with(obj){if(!lyr||!lyr.ref)return;if(isNS4&&self.isMouseIn&&isMouseIn(lyr.ref))return show();if(args[1])lightParent(args[1],0);if(child)child.hide();if(par&&par.child==this)par.child=null;if(lyr){visible=0;if(obj.onhide)obj.onhide(id);setVis(0)}}};FSMenuNode.prototype.lightParent=function(elm,lit){with(this)with(obj){if(!cssLitClass||isNS4)return;if(lit)elm.className+=(elm.className?' ':'')+cssLitClass;else elm.className=elm.className.replace(new RegExp('(\\s*'+cssLitClass+')+$'),'')}};FSMenuNode.prototype.setVis=function(sh){with(this)with(obj){lyr.timer|=0;lyr.counter|=0;with(lyr){clearTimeout(timer);if(sh&&!counter)sty[cssProp]=cssVis;if(isDOM&&animSpeed<100)for(var a=0;a<animations.length;a++)animations[a](ref,counter);counter+=animSpeed*(sh?1:-1);if(counter>100){counter=100}else if(counter<=0){counter=0;sty[cssProp]=cssHid}else if(isDOM)timer=setTimeout(myName+'.menus["'+id+'"].setVis('+sh+')',50)}}};FSMenu.prototype.activateMenu=function(id,subInd){with(this){if(!isDOM||!document.documentElement)return;var a,ul,li,parUL,mRoot=getRef(id),nodes,count=1;if(isIE){var aNodes=mRoot.getElementsByTagName('a');for(var i=0;i<aNodes.length;i++){addEvent(aNodes[i],'focus',new Function('e','var node=this.parentNode;while(node){if(node.onfocus)setTimeout(node.onfocus,1,e);node=node.parentNode}'));addEvent(aNodes[i],'blur',new Function('e','var node=this.parentNode;while(node){if(node.onblur)node.onblur(e);node=node.parentNode}'))}}var lists=mRoot.getElementsByTagName('ul');for(var i=0;i<lists.length;i++){li=ul=lists[i];while(li){if(li.nodeName.toLowerCase()=='li')break;li=li.parentNode}if(!li)continue;parUL=li;while(parUL){if(parUL.nodeName.toLowerCase()=='ul')break;parUL=parUL.parentNode}a=null;for(var j=0;j<li.childNodes.length;j++)if(li.childNodes[j].nodeName.toLowerCase()=='a')a=li.childNodes[j];if(!a)continue;var menuID=myName+'-id-'+count++;if(ul.id)menuID=ul.id;else ul.setAttribute('id',menuID);var sOC=(showOnClick==1&&li.parentNode==mRoot)||(showOnClick==2);var eShow=new Function('with('+myName+'){var m=menus["'+menuID+'"],pM=menus["'+parUL.id+'"];'+(sOC?'if((pM&&pM.child)||(m&&m.visible))':'')+' show("'+menuID+'",this)}');var eHide=new Function(myName+'.hide("'+menuID+'")');addEvent(a,'mouseover',eShow);addEvent(a,'focus',eShow);addEvent(a,'mouseout',eHide);addEvent(a,'blur',eHide);if(sOC)addEvent(a,'click',new Function('e',myName+'.show("'+menuID+'",this);if(e.cancelable&&e.preventDefault)e.preventDefault();e.returnValue=false;return false'));if(subInd)a.insertBefore(subInd.cloneNode(true),a.firstChild)}menus[id]=new FSMenuNode(id,true,this)}};if(!self.page)var page={win:self,minW:0,minH:0,MS:isIE&&!isOp};page.elmPos=function(e,p){var x=0,y=0,w=p?p:this.win;e=e?(e.substr?(isNS4?w.document.anchors[e]:getRef(e,w)):e):p;if(isNS4){if(e&&(e!=p)){x=e.x;y=e.y};if(p){x+=p.pageX;y+=p.pageY}}if(e&&this.MS&&navigator.platform.indexOf('Mac')>-1&&e.tagName=='A'){e.onfocus=new Function('with(event){self.tmpX=clientX-offsetX;self.tmpY=clientY-offsetY}');e.focus();x=tmpX;y=tmpY;e.blur()}else while(e){x+=e.offsetLeft;y+=e.offsetTop;e=e.offsetParent}return{x:x,y:y}};if(isNS4){var fsmMouseX,fsmMouseY,fsmOR=self.onresize,nsWinW=innerWidth,nsWinH=innerHeight;document.fsmMM=document.onmousemove;self.onresize=function(){if(fsmOR)fsmOR();if(nsWinW!=innerWidth||nsWinH!=innerHeight)location.reload()};document.captureEvents(Event.MOUSEMOVE);document.onmousemove=function(e){fsmMouseX=e.pageX;fsmMouseY=e.pageY;return document.fsmMM?document.fsmMM(e):document.routeEvent(e)};function isMouseIn(sty){with(sty)return((fsmMouseX>left)&&(fsmMouseX<left+clip.width)&&(fsmMouseY>top)&&(fsmMouseY<top+clip.height))}}
var divMenu = new FSMenu('divMenu', false, 'visibility', 'visible', 'hidden');
// twinhelix.com


function cmsZoom(pageSource, pageName, theHeight, theWidth)
{
	showScrollbars = '';
	leWindow = window.open(pageSource, pageName, 'width='+theWidth+',height='+theHeight+','+showScrollbars+'resizable'); 
	leWindow.resizeTo(theWidth,theHeight);
	leWindow.focus();
}

/***********************************************
* Switch Content script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use. Last updated April 2nd, 2005.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var enablepersist="on" //Enable saving state of content structure using session cookies? (on/off)
var collapseprevious="no" //Collapse previously open content when opening present? (yes/no)

var contractsymbol='- ' //HTML for contract symbol. For image, use: <img src="whatever.gif">
var expandsymbol='+ ' //HTML for expand symbol.


if (document.getElementById){
document.write('<style type="text/css">')
document.write('.switchcontent{display:none;}')
document.write('</style>')
}

function getElementbyClass(rootobj, classname){
var temparray=new Array()
var inc=0
var rootlength=rootobj.length
for (i=0; i<rootlength; i++){
if (rootobj[i].className==classname)
temparray[inc++]=rootobj[i]
}
return temparray
}

function sweeptoggle(ec){
var thestate=(ec=="expand")? "block" : "none"
var inc=0
while (ccollect[inc]){
ccollect[inc].style.display=thestate
inc++
}
revivestatus()
}


function contractcontent(omit){
var inc=0
while (ccollect[inc]){
if (ccollect[inc].id!=omit)
ccollect[inc].style.display="none"
inc++
}
}

function expandcontent(curobj, cid){
var spantags=curobj.getElementsByTagName("SPAN")
var showstateobj=getElementbyClass(spantags, "showstate")
if (ccollect.length>0){
if (collapseprevious=="yes")
contractcontent(cid)
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"
if (showstateobj.length>0){ //if "showstate" span exists in header
if (collapseprevious=="no")
showstateobj[0].innerHTML=(document.getElementById(cid).style.display=="block")? contractsymbol : expandsymbol
else
revivestatus()
}
}
}

function revivecontent(){
contractcontent("omitnothing")
selectedItem=getselectedItem()
selectedComponents=selectedItem.split("|")
for (i=0; i<selectedComponents.length-1; i++)
document.getElementById(selectedComponents[i]).style.display="block"
}

function revivestatus(){
var inc=0
while (statecollect[inc]){
if (ccollect[inc].style.display=="block")
statecollect[inc].innerHTML=contractsymbol
else
statecollect[inc].innerHTML=expandsymbol
inc++
}
}

function get_cookie(Name) { 
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { 
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function getselectedItem(){
if (get_cookie(window.location.pathname) != ""){
selectedItem=get_cookie(window.location.pathname)
return selectedItem
}
else
return ""
}

function saveswitchstate(){
var inc=0, selectedItem=""
while (ccollect[inc]){
if (ccollect[inc].style.display=="block")
selectedItem+=ccollect[inc].id+"|"
inc++
}

document.cookie=window.location.pathname+"="+selectedItem
}

function do_onload(){
uniqueidn=window.location.pathname+"firsttimeload"
var alltags=document.all? document.all : document.getElementsByTagName("*")
ccollect=getElementbyClass(alltags, "switchcontent")
statecollect=getElementbyClass(alltags, "showstate")
if (enablepersist=="on" && ccollect.length>0){
document.cookie=(get_cookie(uniqueidn)=="")? uniqueidn+"=1" : uniqueidn+"=0" 
firsttimeload=(get_cookie(uniqueidn)==1)? 1 : 0 //check if this is 1st page load
if (!firsttimeload)
revivecontent()
}
if (ccollect.length>0 && statecollect.length>0)
revivestatus()
}

if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload

if (enablepersist=="on" && document.getElementById)
window.onunload=saveswitchstate
function popwindow(pageSource)
{
	leWindow = window.open(pageSource, 'popwindow', 'toolbar=no,width=650,height=650,status=yes,resize=yes,resizable=yes,scrollbars=yes,location=1,menubar=no,x=10,y=20,left=10,top=20'); 
	leWindow.focus();
} 
function map_popup(strURL, strType, strHeight, strWidth) 
{ 
	if (newWin != null && !newWin.closed)	{newWin.close();}
	var strOptions=""; 
	if (strType=="console")			{strOptions="resizable,height="+strHeight+",width="+strWidth;}
	if (strType=="fixed")			{strOptions="status,height="+strHeight+",width="+strWidth;} 
	if (strType == "fixed_scroll")		{strOptions = "scrollbars, menubar, height="+strHeight+",width="+strWidth;}	
	if (strType=="elastic")			{strOptions="toolbar,menubar,scrollbars,"+"resizable,location,height="+strHeight+",width="+strWidth;} 
	newWin = window.open(strURL, 'newWin', strOptions);	
	newWin.focus();
}