/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
 
 function getElementLeft(elem) {		
	xPos = elem.offsetLeft;
	tempEl = elem.offsetParent;
  	while (tempEl != null) {
  			xPos += tempEl.offsetLeft;
	  		tempEl = tempEl.offsetParent;
  	}
	return xPos;
	
}


function getElementTop(elem) {
	yPos = elem.offsetTop;
	tempEl = elem.offsetParent;
	while (tempEl != null) {
  			yPos += tempEl.offsetTop;
	  		tempEl = tempEl.offsetParent;
  	}
	return yPos;
	
}


if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!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 _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[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(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){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(!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;

function loadFlashVideo(fileName, width, height)
{

	var so = new SWFObject("/media/flash/VideoPlayer.swf?XMLpath=" + fileName, "video", width, height, "9", "#ffffff");
	so.addParam("quality", "high");
	so.addParam("wmode", "opaque");
	so.addParam("allowFullScreen", "true");
	so.write('light_gallery');
}


function showGallery(id) {

	document.getElementById('fade').className ='black_overlay';
	document.getElementById('bodyID').className ='NO-BG-BODY';
	document.getElementById('videobox').style.display="block";
	var box = document.getElementById('videobox');



	var elx = document.getElementById('content');
	var ely = document.getElementById('pos_' + id);
	var x = getElementLeft(elx);
	var y = getElementTop(ely);
	
	h = 550;
	if ((y-h)>0) { y = y - h}
	if (y < h) { y= 0 }
	box.style.left = x  + "px";		
	
	box.style.top = y + "px";				
}



function hideGallery() {
	document.getElementById('fade').className ='no_overlay';
	document.getElementById('bodyID').className ='SITE-BODY';
	if (document.getElementById('videobox')) {
	document.getElementById('videobox').style.display='none';
	}
	var el = document.getElementById('light_gallery')
	el.innerHTML = ""
}


function fadeForm(rootID)
{
	var el = document.getElementById(rootID);
	if(el)
	{
		//el.id = 'chachacha';	
		el.className= 'class-form21';
	}
}	

function plainForm(rootID)		
{
	var el = document.getElementById(rootID);
	if(el)
	{
		//el.id = 'chachachi';	
		el.className= 'class-form21';
	}
}	
function showArticle(whichLayer)
{
	//if (document.getElementById)
		document.getElementById(whichLayer).style.display = 'block';
}

function showLayer(whichLayer)
{
	//if (document.getElementById)
		document.getElementById(whichLayer).style.display = 'block';

}

function hideLayer(whichLayer)
{
	//if (document.getElementById)
		document.getElementById(whichLayer).style.display = 'none';
}

function changeColorOver(document_id)
{
	var el = getElement('short-' + document_id);
	if(el)
	{
		el.id = 'short-over';
	}
}


function changeColor(document_id)
{
	var el = getElement('short-over');
	if(el)
	{
		el.id = 'short-' + document_id;
	}
}


//<!--

var win=null;
function NewWindow(mypage,w,h,bScroll,bMenu,bResize, sWinName){
	var LeftPosition, TopPosition, settings
	LeftPosition=(screen.width)?(screen.width-w)/2:100;
	TopPosition=((screen.height)?(screen.height-h)/2:100)-100;
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+bScroll+',location='+bMenu+',directories='+bMenu+',status='+bMenu+',menubar='+bMenu+',toolbar='+bMenu+',resizable='+bResize;
	
	if(win)
	{
		win.close();
		win=window.open(mypage,sWinName,settings);
		win.focus();
	}
	else
	{
		win=window.open(mypage,sWinName,settings);
//		win.resizeTo(w,h); 
		win.focus();
	}				
}

function checkSubmit(e, jsCode)
{
	var charCode = (navigator.appName == "Netscape")? e.which : e.keyCode;
	if(charCode == 13)
	{
		e.keyCode = 9;
		eval(jsCode);
	}
}


function IfSubmit(e)
{
	var charCode = (navigator.appName == "Netscape")? e.which : e.keyCode;
	if(charCode == 13)
	{
		return true;
		e.keyCode = 9;
	}
	return false;
}


function TieButton(btn){
    if (document.all)
    {
		var charCode = (navigator.appName == "Netscape")? event.which : event.keyCode;
    
		if (charCode == 13)
		{
			event.returnValue=false;
			event.cancel = true;
			btn.click();
		}
    }
}


function doSearchForm(document_id, textbox)
{
	document.location.href = "?did=" + document_id + "&" +  textbox.name + "=" + textbox.value;
}

function doSearchFormFromArchive(sitedirectory_id, textbox)
{
	document.location.href = "?aid=" + sitedirectory_id + "&" +  textbox.name + "=" + textbox.value;
}

function getElement(elName)
{	
	return document.all ? document.all(elName) : document.getElementById ? document.getElementById(elName) : document.layers ? document.layers[elName] : null;
}

function getSelectedRadio(buttonGroup) {
   // returns the array number of the selected radio button or -1 if no button is selected
   if (buttonGroup[0]) { // if the button group is an array (one button is not an array)
      for (var i=0; i<buttonGroup.length; i++) {
         if (buttonGroup[i].checked) {
            return i
         }
      }
   } else {
      if (buttonGroup.checked) { return 0; } // if the one button is checked, return zero
   }
   // if we get to this point, no radio button is selected
   return -1;
} 

function getSelectedRadioValue(buttonGroup) {
   // returns the value of the selected radio button or "" if no button is selected
   var i = getSelectedRadio(buttonGroup);
   if (i == -1) {
      return "";
   } else {
      if (buttonGroup[i]) { // Make sure the button group is an array (not just one button)
         return buttonGroup[i].value;
      } else { // The button group is just the one button, and it is checked
         return buttonGroup.value;
      }
   }
} 
function doVoteForm(document_id, radiobutton, bUseOwnWindow)
{
	var iObjectId = getSelectedRadioValue(radiobutton)
	if(iObjectId > -1)
	{
		if(bUseOwnWindow == false)
		{
			document.location.href = "?did=" + document_id + "&documentobjectid=" +  iObjectId + "&viewtype=vote";
		}
	}
}

var wndPopUp = null;
var sImageGalleryWindowProperties = 'toolbar=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,width=780,height=490';

function doWndImageGallery(sImageGalleryPath, sParam)
{
	if(wndPopUp!=null)
		wndPopUp.close();
	var strParam, nw;
	strParam = 'default.aspx?';
	if(sParam) 
		strParam += sParam;
	nw = open(sImageGalleryPath + strParam, 'Archive',sImageGalleryWindowProperties);
	wndPopUp = nw;
	nw.focus();
}

function addImage(file, element)
{
	var nr = new String()
	nr = element.replace('src', '');

	var fileId = parseInt(file.Id, 10);
	var ext = file.Fileextension;

	eval(element + '.value="' + fileId + ext + '"');

	var width = parseInt(file.Width, 10);
	var height = parseInt(file.Height, 10);
	
	if (parseInt(width, 10)<=69 && parseInt(height,10)<=68) // and )
	{
		previewImage(fileId, ext, nr, parseInt(width, 10), parseInt(height,10));
		return;
	}
	else
	{
		if (parseInt(width, 10)<parseInt(height,10))
		{
			previewImage(fileId, ext, nr, (parseInt(width, 10)/parseInt(height,10))*68, 68);
		}
		else
		{
			previewImage(fileId, ext, nr, 69, (parseInt(height,10)/parseInt(width, 10))*69);
		}
	}
}

function previewImage(fileId, ext, nr, width, height)
{
	eval(nr + 'Image.src="arch/_img/w69/' + fileId + ext + '"');
	eval(nr + 'Image.width=' + width);
	eval(nr + 'Image.height=' + height);
}

var winImage=null;

function ShowImage(src,bScroll,bMenu,bResize, sWinName){
	var LeftPosition, TopPosition, settings
	
	if (document.getElementById(src))
	{	
		if (document.getElementById(src).value=='') return;
		
		settings='scrollbars='+bScroll+',location='+bMenu+',directories='+bMenu+',status='+bMenu+',menubar='+bMenu+',toolbar='+bMenu+',resizable='+bResize;
		if(winImage)
		{
			winImage=window.open('arch/_img/' + document.getElementById(src).value,sWinName,settings);
			winImage.focus();
		}
		else
		{
			winImage=window.open('arch/_img/' + document.getElementById(src).value,sWinName,settings);
			winImage.focus();
		}
	}
}

function deleteImage(src)
{
	if (document.getElementById(src)) document.getElementById(src).value='';
	
	var obj = document.getElementById(src.replace('src', '') + 'Image'); 
	if (obj)
	{
		obj.src="im/trans.gif";
		obj.width=70;
		obj.height=50;
	}
}


function addIdFromArchive(object, element)
{	
	switch(getObjectClass(object))
	{
		case 'file_data':
			eval(element + '.value = "' + object.Id + '"');
			break;
		case 'folder_data':
			eval(element + '.value = ' + object.Id);
			break;
		case 'document_data':
			eval(element + '.value = "' + object.Id + '"');
			break;
		case 'sitedirectory_data':			
			eval(element + '.value = "' + object.Id + '"');
			break;
		default:
			alert('Unsupported objecttype: ' + getObjectClass(object) + '\n' + 'Must be "sitedirectory_data", "document_data" or "file_data"');
	}
	
}

function getObjectClass(obj)
{
	if (obj && obj.constructor && obj.constructor.toString)
	{
		var arr = obj.constructor.toString().match(/function\s*(\w+)/);
		return arr && arr.length == 2 ? arr[1] : undefined;
	}
	else
	{
		return undefined;
	}
}

function Set_Cookie( name, value, expires, path, domain, secure ) 
{
// set time, it's in milliseconds
var today = new Date();
today.setTime( today.getTime() );

/*
if the expires variable is set, make the correct 
expires time, the current script below will set 
it for x number of days, to make it for hours, 
delete * 24, for minutes, delete * 60 * 24
*/
if ( expires )
{
//expires = expires * 1000 * 60 * 60 * 24;
expires = expires * 1000 * 60 * 60;
}
var expires_date = new Date( today.getTime() + (expires) );

document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
( ( path ) ? ";path=" + path : "" ) + 
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}

// this function gets the cookie, if it exists
function Get_Cookie( name ) {
	
var start = document.cookie.indexOf( name + "=" );
var len = start + name.length + 1;
if ( ( !start ) &&
( name != document.cookie.substring( 0, name.length ) ) )
{
return null;
}
if ( start == -1 ) return null;
var end = document.cookie.indexOf( ";", len );
if ( end == -1 ) end = document.cookie.length;
return unescape( document.cookie.substring( len, end ) );
}
// this deletes the cookie when called
function Delete_Cookie( name, path, domain ) {
if ( Get_Cookie( name ) ) document.cookie = name + "=" +
( ( path ) ? ";path=" + path : "") +
( ( domain ) ? ";domain=" + domain : "" ) +
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}
		


function get_random(iMax)
{
    var ranNum= Math.round(Math.random()*parseInt(iMax,10));
    if(ranNum < 1)
      return get_random(iMax);
    return ranNum;
}

/* Andrew Urquhart : Client-Side Request Object for javascript : http://andrewu.co.uk/tools/request/
COPYRIGHT:You are free to use this script for any use you wish if this comment is left intact. Feel free to enhance the script and send me the updated version. Please don't redistribute. This script is provided as is,with no warranty of any kind. Use it at your own risk. Copyright Andrew R Urquhart; VERSION:#1.3 2005-05-11 17:52 UTC*/
function RObj(ea){var LS="";var QS=new Object();var un="undefined";var x=null;var f="function";var n="number";var r="string";var e1="ERROR:Index out of range in\r\nRequest.QueryString";var e2="ERROR:Wrong number of arguments or invalid property assignment\r\nRequest.QueryString";var e3="ERROR:Object doesn't support this property or method\r\nRequest.QueryString.Key";function Err(arg){if(ea){alert("Request Object:\r\n"+arg)}};function URID(t){var d="";if(t){for(var i=0;i<t.length;++i){var c=t.charAt(i);d+=(c=="+"?" ":c)}};return unescape(d)};function OL(o){var l=0;for(var i in o){if(typeof o[i]!=f){l++}};return l};function AK(key){var auk=true;for(var u in QS){if(typeof QS[u]!=f&&u.toString().toLowerCase()==key.toLowerCase()){auk=false;return u}}if(auk){QS[key]=new Object();QS[key].toString=function(){return TS(QS[key])};QS[key].Count=function(){return OL(QS[key])};QS[key].Count.toString=function(){return OL(QS[key]).toString()};QS[key].Item=function(e){if(typeof e==un){return QS[key]}else {if(typeof e==n){var a=QS[key][Math.ceil(e)];if(typeof a==un){Err(e1+"(\""+key+"\").Item("+e+")")};return a}else {Err("ERROR:Expecting numeric input in\r\nRequest.QueryString(\""+key+"\").Item(\""+e+"\")")}}};QS[key].Item.toString=function(e){if(typeof e==un){return QS[key].toString()}else {var a=QS[key][e];if(typeof a==un){Err(e1+"(\""+key+"\").Item("+e+")")};return a.toString()}};QS[key].Key=function(e){var t=typeof e;if(t==r){var a=QS[key][e];return(typeof a!=un&&a&&a.toString()?e:"")}else {Err(e3+"("+(e?e:"")+")")}};QS[key].Key.toString=function(){return x}};return key};function AVTK(key,val){if(key!=""){var key=AK(key);var l=OL(QS[key]);QS[key][l+1]=val}};function TS(o){var s="";for(var i in o){var ty=typeof o[i];if(ty=="object"){s+=TS(o[i])}else if(ty!=f){s+=o[i]+", "}};var l=s.length;if(l>1){return(s.substring(0,l-2))}return(s==""?x:s)};function KM(k,o){var k=k.toLowerCase();for(var u in o){if(typeof o[u]!=f&&u.toString().toLowerCase()==k){return u}}}if(window.location&&window.location.search){LS=window.location.search;var l=LS.length;if(l>0){LS=LS.substring(1,l);var preAmpAt=0;var ampAt=-1;var eqAt=-1;var k=0;var skip=false;for(var i=0;i<l;++i){var c=LS.charAt(i);if(LS.charAt(preAmpAt)=="="||(preAmpAt==0&&i==0&&c=="=")){skip=true}if(c=="="&&eqAt==-1&&!skip){eqAt=i}if(c=="&"&&ampAt==-1){if(eqAt!=-1){ampAt=i}if(skip){preAmpAt=i+1};skip=false}if(ampAt>eqAt){AVTK(URID(LS.substring(preAmpAt,eqAt)),URID(LS.substring(eqAt+1,ampAt)));preAmpAt=ampAt+1;eqAt=ampAt=-1;++k}}if(LS.charAt(preAmpAt)!="="&&(preAmpAt!=0||i!=0||c!="=")){if(preAmpAt!=l){if(eqAt!=-1){AVTK(URID(LS.substring(preAmpAt,eqAt)),URID(LS.substring(eqAt+1,l)))}else if(preAmpAt!=l-1){AVTK(URID(LS.substring(preAmpAt,l)),"")}}if(l==1){AVTK(LS.substring(0,1),"")}}}};var TC=OL(QS);if(!TC){TC=0};QS.toString=function(){return LS.toString()};QS.Count=function(){return(TC?TC:0)};QS.Count.toString=function(){return(TC?TC.toString():"0")};QS.Item=function(e){if(typeof e==un){return LS}else {if(typeof e==n){var e=Math.ceil(e);var c=0;for(var i in QS){if(typeof QS[i]!=f&&++c==e){return QS[i]}};Err(e1+"().Item("+e+")")}else {return QS[KM(e,QS)]}};return x};QS.Item.toString=function(){return LS.toString()};QS.Key=function(e){var t=typeof e;if(t==n){var e=Math.ceil(e);var c=0;for(var i in QS){if(typeof QS[i]!=f&&++c==e){return i}}}else if(t==r){var e=KM(e,QS);var a=QS[e];return(typeof a!=un&&a&&a.toString()?e:"")}else {Err(e2+"().Key("+(e?e:"")+")")};Err(e1+"().Item("+e+")")};QS.Key.toString=function(){Err(e2+"().Key")};this.QueryString=function(k){if(typeof k==un){return QS}else {var k=KM(k,QS);if(typeof QS[k]==un){t=new Object();t.Count=function(){return 0};t.Count.toString=function(){return "0"};t.toString=function(){return x};t.Item=function(e){return x};t.Item.toString=function(){return x};t.Key=function(e){Err(e3+"("+(e?e:"")+")")};t.Key.toString=function(){return x};return t}if(typeof k==n){return QS.Item(k)}else {return QS[k]}}};this.QueryString.toString=function(){return LS.toString()};this.QueryString.Count=function(){return(TC?TC:0)};this.QueryString.Count.toString=function(){return(TC?TC.toString():"0")};this.QueryString.Item=function(e){if(typeof e==un){return LS.toString()}else {if(typeof e==n){var e=Math.ceil(e);var c=0;for(var i in QS){if(typeof QS[i]!=f&&++c==e){return QS[i]}};Err(e1+".Item("+e+")")}else {return QS[KM(e,QS)]}}if(typeof e==n){Err(e1+".Item("+e+")")};return x};this.QueryString.Item.toString=function(){return LS.toString()};this.QueryString.Key=function(e){var t=typeof e;if(t==n){var e=Math.ceil(e);var c=0;for(var i in QS){if(typeof QS[i]=="object"&&(++c==e)){return i}}}else if(t==r){var e=KM(e,QS);var a=QS[e];return(typeof a!=un&&a&&a.toString()?e:"")}else {Err(e2+".Key("+(e?e:"")+")")};Err(e1+".Item("+e+")")};this.QueryString.Key.toString=function(){Err(e2+".Key")};this.Version=1.3;this.Author="Andrew Urquhart (www.andrewu.co.uk)"};var Request=new RObj(false);

function HTMLEncode(t) {
    return t.toString().replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
}

var DH = 0; var an = 0; var al = 0; var ai = 0; var deltax = 0; var deltay = 0; if (document.getElementById) { ai = 1; DH = 1; } else { if (document.all) { al = 1; DH = 1; } else { browserVersion = parseInt(navigator.appVersion); if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) { an = 1; DH = 1; } } } function fd(oi, wS) { if (ai) return wS ? document.getElementById(oi).style : document.getElementById(oi); if (al) return wS ? document.all[oi].style : document.all[oi]; if (an) return document.layers[oi]; }
function pw() { return window.innerWidth != null ? window.innerWidth : document.body.clientWidth != null ? document.body.clientWidth : null; }
function mouseX(evt) { if (evt.pageX) return evt.pageX + deltax; else if (evt.clientX) return deltax + evt.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); else return null; }
function mouseY(evt) { if (evt.pageY) return evt.pageY + deltay; else if (evt.clientY) return deltay + evt.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); else return null; }
function popUp(evt, oi) { if (DH) { var wp = pw(); ds = fd(oi, 1); dm = fd(oi, 0); st = ds.visibility; if (dm.offsetWidth) ew = dm.offsetWidth; else if (dm.clip.width) ew = dm.clip.width; if (st == "visible" || st == "show") { ds.visibility = "hidden"; } else { tv = mouseY(evt) + 20; lv = mouseX(evt) - (ew / 4); if (lv < 2) lv = 2; else if (lv + ew > wp) lv -= ew / 2; if (!an) { lv += 'px'; tv += 'px'; } ds.left = lv; ds.top = tv; ds.visibility = "visible"; } } }
function popUpDelta(evt, oi, dx, dy) { if (DH) { deltax = dx; deltay = dy; var wp = pw(); ds = fd(oi, 1); dm = fd(oi, 0); st = ds.visibility; if (dm.offsetWidth) ew = dm.offsetWidth; else if (dm.clip.width) ew = dm.clip.width; if (st == "visible" || st == "show") { ds.visibility = "hidden"; } else { tv = mouseY(evt) + 20; lv = mouseX(evt) - (ew / 4); if (lv < 2) lv = 2; else if (lv + ew > wp) lv -= ew / 2; if (!an) { lv += 'px'; tv += 'px'; } ds.left = lv; ds.top = tv; ds.visibility = "visible"; } } }
// -->
