function selectItemValue(objList, value){	for (k=0; k<objList.length; k++)	{		if (objList.item(k).value==value)		{			objList.selectedIndex=k;			return;		}	}}function isValueExists(objList, value){	for (k=0; k<objList.length; k++)	{		if (objList.item(k).value==value)		{			return true;		}	}	return false;}
function toggleDisplay(objid, objlabelid, strexpand, strcollapse, toggleid, c)
{	var obj, objlabel;	obj = xGetElementById(objid);	objlabel = xGetElementById(objlabelid);	if ((obj!=null))	{		if (obj.style.display=="none")		{			if (objlabel!=null) objlabel.innerHTML=strexpand;			obj.style.display="block";			obj = xGetElementById(toggleid);			if (obj)			{				obj.style.backgroundColor="transparent";			}		}
		else		{
			if (objlabel!=null) objlabel.innerHTML=strcollapse;			obj.style.display="none";			obj = xGetElementById(toggleid);			if (obj)			{				obj.style.backgroundColor=(c==null ? "#FFFF80" : c);			}		}	}}function hideBlock(objid, objlabelid, strcollapse){	var obj, objlabel;	obj = document.getElementById(objid);	objlabel = document.getElementById(objlabelid);	if ((obj!=null))	{		if (objlabel!=null) objlabel.innerHTML=strcollapse;		obj.style.display="none";	}}
function popwin(url){	var str="toolbar=no, width=450,height=550,directories=0,status=0,scrollbars=1,resize=0,menubar=0"	newWindow = window.open(url,"popup", str).focus();}
function selectItemText(objList, text){	for (k=0; k<objList.length; k++)	{		if (objList.item(k).text==text)		{			objList.selectedIndex=k;			return;		}	}}
function checkTextAreaLimit(objTextArea, maxchars, errMsg){	if (objTextArea.value.length > maxchars)	{		alert(errMsg);		return false;	} 	else 	{ 		return true; 	} }function setCookie(cookieName, cookieValue, isremove) {	var now = new Date();	var cookiestr =  escape(cookieName) + '=' + escape(cookieValue) + '; path=/; expires=';	if (isremove)		cookiestr += (new Date(now.getTime() - 365 * 1000 * 60 * 60 * 24)).toGMTString();	else		cookiestr += (new Date(now.getTime() + 365 * 1000 * 60 * 60 * 24)).toGMTString();	document.cookie = cookiestr;}function setSessionCookie(cookieName, cookieValue) {	var now = new Date();	var cookiestr =  escape(cookieName) + '=' + escape(cookieValue) + '; path=/;';	document.cookie = cookiestr;}function getCookie(c_name){	if (document.cookie.length>0)	{		var c = " " + document.cookie;		c_start=c.indexOf(" " + c_name + "=");		if (c_start!=-1)		{ 			c_start=c_start + c_name.length+2; 			c_end=c.indexOf(";",c_start);			if (c_end==-1) c_end=c.length;			return unescape(c.substring(c_start,c_end));		} 	}	return "";}function langRedirect(lang){	setCookie('lang', lang);	location.reload(true);}function limitText(limitObj, limitNum){	limitDisp = xGetElementById(limitObj.id + '-limit');	if (limitObj.value.length > limitNum) 	{		limitObj.value = limitObj.value.substring(0, limitNum);	}	limitDisp.innerHTML = (limitNum - limitObj.value.length);}function storeSearchLocationCookie(cid){	setCookie('searchcid', cid);}function getDocHeight() {    var D = document;    return Math.max(        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),        Math.max(D.body.clientHeight, D.documentElement.clientHeight)    );}function getLicenseDisplay(license_type_name){	if (xGetElementById("license_option_" + license_type_name + "_cc").checked)	{		var o = xGetElementById("cc_type_" + license_type_name);		return "CC: " + o.item(o.selectedIndex).text;	}	else if (xGetElementById("license_option_" + license_type_name + "_copyright").checked)	{		return xGetElementById("license_option_" + license_type_name  + "_copyright_label").innerHTML;	} 	else if (xGetElementById("license_option_" + license_type_name + "_gnu").checked) 	{		return xGetElementById("license_option_" + license_type_name  + "_gnu_label").innerHTML; 	}	}
 /* xMenu1 Object Prototype   Parameters:     triggerId   - id string of trigger element.     menuId      - id string of menu.     mouseMargin - integer margin around menu;                   when mouse is outside this margin the menu is hid.     openEvent   - string name of event on which to open menu ('click', 'mouseover', etc). */
  function xMenu1(triggerId, menuId, menuframeId, mouseMargin, openEvent, displacement) {   var isMenuOpen = false;   var trg = xGetElementById(triggerId);   var mnu = xGetElementById(menuId);   var iframe = xGetElementById(menuframeId);   var disp = displacement;   var current_disp = displacement;   var timer = null;      this.onClose = onClose;   this.onOpen = onOpen;   this.isOpen = isOpen;   this.triggerObj = triggerObj;   this.setSticky = setSticky;   this.setSticky2 = setSticky2;   this.onScroll = onScroll;   this.onScroll2 = onScroll2;   this.moveTo = moveTo;   this.delayedClose = delayedClose;   this.getCurrentDisp = getCurrentDisp;   if (trg && mnu) {     xAddEventListener(trg, openEvent, onOpen, false);   }   function setSticky()   {   		xAddEventListener(window, 'scroll', onScroll, false);   }   function setSticky2()   {   		xAddEventListener(window, 'scroll', onScroll2, false);   }   function triggerObj()   {		return trg;   }   function getCurrentDisp()   {		return current_disp;   }   function isOpen()   {	   return isMenuOpen;   }   function onOpen(width, height, triggerobj, displacement, parentobj)   {	 current_disp = displacement;   	 var mx=0, my=0;     if (width!=null) xResizeTo(mnu, width, xHeight(mnu));     if (height!=null) xResizeTo(mnu, xWidth(mnu), height);     if (triggerobj!=null) trg = triggerobj;          if (trg!=null)     {	     my = xPageY(trg) + xHeight(trg);	   	 if ((disp==1) || (displacement==1))	   	 {	   	 	mx = xPageX(trg) - (xWidth(mnu) - xWidth(trg));	   	 }	   	 else if ((disp==2) || (displacement==2))	   	 {	   	 	mx = xPageX(trg) + xWidth(trg);	   	 	my = xPageY(trg) - (xHeight(mnu)/2) + xHeight(trg);	   	 	if (my<0) my=0;	   	 }	   	 else if ((disp==3) || (displacement==3))	   	 {	   	 	mx = xPageX(trg);	   	 }	   	 else if ((disp==4) || (displacement==4))	   	 {	   	 	mx = xPageX(trg) + xWidth(trg);	   	 	my = xPageY(trg) - xHeight(mnu) + xHeight(trg);	   	 	if (my<0) my=0;	   	 }	   	 else if ((disp==5) || (displacement==5))	   	 {			mx = xPageX(trg) - (xWidth(mnu)/2 - xWidth(trg)/2);	   	 	my = xPageY(trg) - xHeight(mnu);	   	 	if (my<0) my=0;	   	 	if (my-15<document.body.scrollTop)		   	 	scroll(0,Math.max(my - 15, 0));	   	 }	   	 else if ((disp==7) || (displacement==7))	   	 {			mx = xPageX(trg);	   	 	my = xPageY(trg);	   	 }	   	 else if ((disp==8) || (displacement==8))	   	 {			mx = eval(xPageX(trg) + 32);	   	 	my = xPageY(trg) - xHeight(mnu);	   	 	if (my<0) my=0;	   	 	if (my-15<document.body.scrollTop)		   	 	scroll(0,Math.max(my - 15, 0));	   	 }	   	 else if ((disp==9) || (displacement==9))	   	 {			mx = xPageX(trg);	   	 	my = xPageY(trg) - xHeight(mnu);	   	 	if (my<0) my=0;	   	 	if (my-15<document.body.scrollTop)		   	 	scroll(0,Math.max(my - 15, 0));	   	 }	   	 else if ((disp==10) || (displacement==10))	   	 {	   	 	mx = xPageX(trg) - (xWidth(mnu) - xWidth(trg));	   	 	my = xPageY(trg) - xHeight(mnu);	   	 	if (my<0) my=0;	   	 	if (my-15<document.body.scrollTop)		   	 	scroll(0,Math.max(my - 15, 0));	   	 }	   	 else	   	 {			mx = xPageX(trg) - (xWidth(mnu)/2 - xWidth(trg)/2);//	   	 	scroll(0,Math.max(my - 15, 0));		}	}	else	{		mx = ((xClientWidth() - xWidth(mnu))/2);		my = xScrollTop();	}	if (parentobj)	{		mx -= xScrollLeft(parentobj);		my -= xScrollTop(parentobj);	}	if ((disp==6) || (displacement==6))	{		mx = (xClientWidth() - xWidth(mnu)) / 2;		my = xScrollTop() + (xClientHeight() - xHeight(mnu)) / 2;	}	     /* if (!isMenuOpen) */     {       xMoveTo(mnu, mx, my);       xShow(mnu);       if (iframe)       {         xResizeTo(iframe, xWidth(mnu), xHeight(mnu));         xMoveTo(iframe, mx, my);	     xShow(iframe);       }//       xAddEventListener(document, 'mousemove', onMousemove, false);       isMenuOpen = true;     }   }   function onMousemove(ev)   {     var e = new xEvent(ev);     if (!xHasPoint(mnu, e.pageX, e.pageY, -mouseMargin) &&         !xHasPoint(trg, e.pageX, e.pageY, -mouseMargin))     {       this.onClose();     }   }   function delayedClose(sec)   {   		timer = setTimeout(onClose, sec * 1000);   }   function onClose()   {   	if (isMenuOpen)   	{   		 if (timer)   		 {   		 	clearTimeout(timer);   		 	timer = null;   		 }	     if (iframe) xHide(iframe);	     xHide(mnu);//		  if (iframe) xMoveTo(iframe, 0, 0);//	     xMoveTo(mnu, 0, 0);	//     xRemoveEventListener(document, 'mousemove', onMousemove, false);	     isMenuOpen = false;     }   }   function moveTo(x, y)   {	     if (iframe) xMoveTo(iframe, x, y);	     xMoveTo(mnu, x, y);   }   function onScroll2()   {		if (isMenuOpen)		{			mx = (xClientWidth() - xWidth(mnu)) / 2;			my = (xClientHeight() - xHeight(mnu)) / 2;			moveTo(mx, xScrollTop() + my);		}   }   function onScroll()   {   	if (isMenuOpen)   	{		moveTo(((xClientWidth() - xWidth(mnu))/2), xScrollTop());     }   } } // end xMenu1function setViewMode(isview){	setCookie('viewmode', isview, (isview!='Y'));	location.reload(true);}function ImagePreloader(images, callback){	// store the call-back	this.callback = callback;		// initialize internal state.	this.nLoaded = 0;	this.nProcessed = 0;	this.aImages = new Array;		// record the number of images.	this.nImages = images.length;		// for each image, call preload()	for ( var i = 0; i < images.length; i++ ) 	{		this.preload(images[i]);	}}							ImagePreloader.prototype.preload = function(image){	// create new Image object and add to array	var oImage = new Image;	this.aImages.push(oImage);		// set up event handlers for the Image object	oImage.onload = ImagePreloader.prototype.onload;	oImage.onerror = ImagePreloader.prototype.onerror;	oImage.onabort = ImagePreloader.prototype.onabort;		// assign pointer back to this.	oImage.oImagePreloader = this;	oImage.bSuccess = false;		// assign the .src property of the Image object	oImage.src = image;}ImagePreloader.prototype.onload = function(){	this.bSuccess = true;	this.oImagePreloader.nLoaded++;	this.oImagePreloader.callback(this);}							ImagePreloader.prototype.onerror = function(){	this.bError = true;	this.oImagePreloader.callback(this);}							ImagePreloader.prototype.onabort = function(){	this.bAbort = true;	this.oImagePreloader.callback(this);}function Hashtable(){    this._hash = new Object();    this.put = function (key, value)    {		if (typeof(key)!="undefined")		{			this._hash[key] = (typeof(value)=="undefined" ? null : value);			return true;		}		else		{			return false;		}    }    this.remove = function (key)    {    	delete this._hash[key];    }    this.count = function ()    {    	var i=0;    	for (var k in this._hash)    	{    		i++;    	}		return i;    }    this.get = function (key)    {    	return this._hash[key];    }    this.contains = function (key)    {    	return typeof(this._hash[key])!="undefined";    }    this.clear = function ()    {    	for (var k in this._hash)    	{    		delete this._hash[k];    	}    }}