// 1k DHTML API - standards version
d=document;l=d.layers;op=navigator.userAgent.indexOf('Opera')!=-1;px='px';
function gE(e,f){if(l){f=(f)?f:self;var V=f.document.layers;if(V[e])return V[e];for(var W=0;W<V.length;)t=gE(e,V[W++]);return t;}if(d.all)return d.all[e];return d.getElementById(e);}
function sE(e){l?e.visibility='show':e.style.visibility='visible';}
function hE(e){l?e.visibility='hide':e.style.visibility='hidden';}
function sZ(e,z){l?e.zIndex=z:e.style.zIndex=z;}
function sX(e,x){l?e.left=x:op?e.style.pixelLeft=x:e.style.left=x+px;}
function sY(e,y){l?e.top=y:op?e.style.pixelTop=y:e.style.top=y+px;}
function sW(e,w){l?e.clip.width=w:op?e.style.pixelWidth=w:e.style.width=w+px;}
function sH(e,h){l?e.clip.height=h:op?e.style.pixelHeight=h:e.style.height=h+px;}
function sC(e,t,r,b,x){l?(X=e.clip,X.top=t,X.right=r,X.bottom=b,X.left=x):e.style.clip='rect('+t+px+' '+r+px+' '+b+px+' '+x+px+')';}
function wH(e,h){if(l){Y=e.document;Y.open();Y.write(h);Y.close();}if(e.innerHTML)e.innerHTML=h;}


//added by Infinite Reality
//get clip
function gC(elem)
{
	return elem.coords.split(",");	
}

//set margin top
function sMT(e,val)
{
	e.style.marginTop = val;
}

function gVis(e)
{
return l?(e.visibility=='show'):(e.style.visibility=='visible');

}

//stop event propagation
function stopEvent(e)
{
	if (!e) var e = window.event;
	e.cancelBubble = true;
	if (e.stopPropagation) e.stopPropagation();									

}
//get event element
function gEvtE(e)
{
	if (!e) e = window.event;

	if (e.originalTarget)
	return e.originalTarget;
	else if (e.srcElement)
	return e.srcElement;
}

function mxpause(milisecs)
{
	d = new Date() //today's date
	while (1)
	{
		mill=new Date() // Date Now
		diff = mill-d //difference in milliseconds
		if( diff > milisecs ) {break;}
	}
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		//window.status = 'Loading( ' + arg + ' )';
		rslt.onload = function() {
			//window.status = '';		
		}
		return rslt;
	}
}


//get element ID
function gEname(e)
{
	return e.id;
}

//add

function getW(e){

    if (e.style.width)
      return(e.style.width);
    else
      return(e.offsetWidth);
		 
}
function getH(e){

    if (false && e.style.height)
      return(e.style.height);
    else
      return(e.offsetHeight);

}



function setOp(el,opacity)
{
    if (browser.isIE)
    {
    	el.style['filter'] = 'alpha(opacity: ' + opacity + ')';
    }else
    if (browser.isGecko)
    {
    	//el.style['MozOpacity'] = opacity / 100;
	el.style.setProperty("-moz-opacity", opacity / 100, "");
    }else
    {
    	el.style['KhtmlOpacity'] = opacity;
    	el.style['opacity'] = opacity;
    }

/*	if (el.filters)
	if( el.filters.alpha ) {
			el.filters.alpha.opacity = opacity;
	}
	if (!document.all && el.style.setProperty) el.style.setProperty("-moz-opacity", opacity / 100, "");
*/
}




function getMouseXY(e)
{
// www.quirksmode.org
    var point = { x: 0, y: 0 };
    //alert(evt);
    
	//if (!e) var e = window.event;
	var e = (e) ? e : event;
	
	if (e.pageX || e.pageY)
	{
		point.x = e.pageX;
		point.y = e.pageY;
	}
	else
	if (e.clientX || e.clientY)
	{	
		point.x = e.clientX;		
		point.y = e.clientY;
		//from http://www.howtocreate.co.uk/tutorials/index.php?tut=0&part=17
		if( !( ( window.navigator.userAgent.indexOf( 'Opera' ) + 1 ) ||
        ( window.ScriptEngine && ScriptEngine().indexOf( 'InScript' ) + 1 ) ||
        window.navigator.vendor == 'KDE' ) ) {
        if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
          //IE 4, 5 & 6 (in non-standards compliant mode)
          point.x += document.body.scrollLeft;
          point.y += document.body.scrollTop;
        } else if( document.documentElement &&
          ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
          //IE 6 (in standards compliant mode)
          point.x += document.documentElement.scrollLeft;
          point.y += document.documentElement.scrollTop;
        }
      }		
	}
	
//    point.x = evt.clientX,
//    point.y = evt.clientY;
    //point.x = evt.pageX;
    //point.y = evt.pageY;
    return point;
}


//Stolen from Netscape DevEdge; Modified

function getPageXY(elm)
{
	
  var point = { x: 0, y: 0 };
  while (elm)
  {
    point.x += elm.offsetLeft;
    point.y += elm.offsetTop;
    elm = elm.offsetParent;
  }
  return point;
}

function setPageXY(elm, x, y)
{
  var parentXY = {x: 0, y: 0 };

  if (elm.offsetParent)
  {
    parentXY = getPageXY(elm.offsetParent);
  }

  elm.style.left = (x - parentXY.x ) + 'px';
  elm.style.top  = (y - parentXY.y ) + 'px';
}
//-------------------------------------------------------------------------------------
// className functions
// Dean Edwards 2004.10.24

function addClass(element, className) {

    if (!hasClass(element, className)) {
        if (element.className) element.className += " " + className;
        else element.className = className;
    }
};

function removeClass(element, className) {
    var regexp = new RegExp("(^|\\s)" + className + "(\\s|$)");
    element.className = element.className.replace(regexp, "$2");
};

function hasClass(element, className) {
    var regexp = new RegExp("(^|\\s)" + className + "(\\s|$)");
    return regexp.test(element.className);
};
//-------------------------------------------------------------------------------------
function MXtoggle(e)
{
	if (e.expcol != true)
	{
		e.mxexpand = e.style.display;
		e.expcol = true;
		e.style.display = "none";
	}else
	{		
		e.expcol = false;
		e.style.display = e.mxexpand;		
	}
	
	
}
//-------------------------------------------------------------------------------------
function MXcollapse(e)
{
	if (e.expcol != true)
	{
		MXexpcol(e);
	}
	e.style.display = "none";
	e.visi = false;
}
function MXexpand(e)
{
	e.visi = true;
	e.style.display = e.mxexpand;
}
function MXexpcol(e)
{
	e.mxexpand = e.style.display;
	e.expcol = true;
}
//-------------------------------------------------------------------------------------
function MXfindparent(e,tagname)
{
	if (!browser.isDOM1)
	{
		return false;
	}
	var parent = e.parentNode;
	if (parent)
	if (parent.nodeName == tagname)
	{
		return parent;
	}else{
		return MXfindparent(parent,tagname);
	}	
}
//-------------------------------------------------------------------------------------
function isChildOf(child,parent)
{
	for (i=0;i<parent.childNodes.length;i++)
	{
		if (parent.childNodes[i] == child)
		{
			return true;
		}
	}
	return false
}
//-------------------------------------------------------------------------------------
function MXqform(qob)
{
    els = qob._fields;
    
	//alert(els.length);    
    
    for (ti=0;ti<els.length;ti++) {
        el = els[ti];
        ff = qob._pointers[el.toLowerCase()];
        e = gE(el);
        if (e)
        {
        	ff.description = e.description;
       		//alert( ff.description);
       	}
    }
	
}
//-------------------------------------------------------------------------------------
function MXparseDate(strD)
{
	//only for date format: 2004-08-15
	//new Date(y, m, d, hr, min, 0)	
	var dat = strD.split(" ");
	var pieces = dat[0].split("-");
	var y = pieces[0];
	var m = pieces[1] - 1;	
	var d = pieces[2];	
	
	//var pieces = dat[1].split(":");
	//var H = pieces[0];
	//var M = pieces[1];
	var H = 0;
	var M = 0;
	
	
	return new Date(y, m, d, H, M, 0);
}
//-------------------------------------------------------------------------------------
// Browser Detect Lite  v2.1.4
// http://www.dithered.com/javascript/browser_detect/index.html
// modified by Chris Nott (chris@NOSPAMdithered.com - remove NOSPAM)
//-------------------------------------------------------------------------------------
function BrowserDetectLite() {
   var ua = navigator.userAgent.toLowerCase(); 

   // browser name
   this.isGecko     = (ua.indexOf('gecko') != -1 && ua.indexOf('safari') == -1);
   this.isMozilla   = (this.isGecko && ua.indexOf('gecko/') + 14 == ua.length);
   this.isNS        = ( (this.isGecko) ? (ua.indexOf('netscape') != -1) : ( (ua.indexOf('mozilla') != -1) && (ua.indexOf('spoofer') == -1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('opera') == -1) && (ua.indexOf('webtv') == -1) && (ua.indexOf('hotjava') == -1) ) );
   this.isIE        = ( (ua.indexOf('msie') != -1) && (ua.indexOf('opera') == -1) && (ua.indexOf('webtv') == -1) ); 
   this.isSafari    = (ua.indexOf('safari') != - 1);
   this.isOpera     = (ua.indexOf('opera') != -1); 
   this.isKonqueror = (ua.indexOf('konqueror') != -1 && !this.isSafari); 
   this.isIcab      = (ua.indexOf('icab') != -1); 
   this.isAol       = (ua.indexOf('aol') != -1); 
   
   // spoofing and compatible browsers
   this.isIECompatible = ( (ua.indexOf('msie') != -1) && !this.isIE);
   this.isNSCompatible = ( (ua.indexOf('mozilla') != -1) && !this.isNS && !this.isMozilla);
   
   // browser version
   this.versionMinor = parseFloat(navigator.appVersion); 
   
   // correct version number
   if (this.isNS && this.isGecko) {
      this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('/') + 1 ) );
   }
   else if (this.isIE && this.versionMinor >= 4) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('msie ') + 5 ) );
   }
   else if (this.isMozilla) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) );
   }
   else if (this.isSafari) {
      this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('/') + 1 ) );
   }
   else if (this.isOpera) {
      if (ua.indexOf('opera/') != -1) {
         this.versionMinor = parseFloat( ua.substring( ua.indexOf('opera/') + 6 ) );
      }
      else {
         this.versionMinor = parseFloat( ua.substring( ua.indexOf('opera ') + 6 ) );
      }
   }
   else if (this.isKonqueror) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('konqueror/') + 10 ) );
   }
   else if (this.isIcab) {
      if (ua.indexOf('icab/') != -1) {
         this.versionMinor = parseFloat( ua.substring( ua.indexOf('icab/') + 6 ) );
      }
      else {
         this.versionMinor = parseFloat( ua.substring( ua.indexOf('icab ') + 6 ) );
      }
   }
   
   this.versionMajor = parseInt(this.versionMinor); 
   this.geckoVersion = ( (this.isGecko) ? ua.substring( (ua.lastIndexOf('gecko/') + 6), (ua.lastIndexOf('gecko/') + 14) ) : -1 );
	//  GECKO REVISION
	this.geckoRevision = -1;
	if (this.isGecko) {
		temp = ua.split("rv:");
		this.geckoRevision = parseFloat(temp[1]);
	}
   
   // dom support
   this.isDOM1 = (document.getElementById);
   this.isDOM2Event = (document.addEventListener && document.removeEventListener);
   
   // css compatibility mode
   this.mode = document.compatMode ? document.compatMode : 'BackCompat';

   // platform
   this.isWin   = (ua.indexOf('win') != -1);
   this.isWin32 = (this.isWin && ( ua.indexOf('95') != -1 || ua.indexOf('98') != -1 || ua.indexOf('nt') != -1 || ua.indexOf('win32') != -1 || ua.indexOf('32bit') != -1 || ua.indexOf('xp') != -1) );
   this.isMac   = (ua.indexOf('mac') != -1);
   this.isUnix  = (ua.indexOf('unix') != -1 || ua.indexOf('sunos') != -1 || ua.indexOf('bsd') != -1 || ua.indexOf('x11') != -1)
   this.isLinux = (ua.indexOf('linux') != -1);
   
   // specific browser shortcuts
   this.isNS4x = (this.isNS && this.versionMajor == 4);
   this.isNS40x = (this.isNS4x && this.versionMinor < 4.5);
   this.isNS47x = (this.isNS4x && this.versionMinor >= 4.7);
   this.isNS4up = (this.isNS && this.versionMinor >= 4);
   this.isNS6x = (this.isNS && this.versionMajor == 6);
   this.isNS6up = (this.isNS && this.versionMajor >= 6);
   this.isNS7x = (this.isNS && this.versionMajor == 7);
   this.isNS7up = (this.isNS && this.versionMajor >= 7);
   
   this.isIE4x = (this.isIE && this.versionMajor == 4);
   this.isIE4up = (this.isIE && this.versionMajor >= 4);
   this.isIE5x = (this.isIE && this.versionMajor == 5);
   this.isIE55 = (this.isIE && this.versionMinor == 5.5);
   this.isIE55up = (this.isIE && this.versionMinor >= 5.5);
   this.isIE5up = (this.isIE && this.versionMajor >= 5);
   this.isIE6x = (this.isIE && this.versionMajor == 6);
   this.isIE6up = (this.isIE && this.versionMajor >= 6);
   
   this.isIE4xMac = (this.isIE4x && this.isMac);
}
var browser = new BrowserDetectLite();

//*** This code is copyright 2003 by Gavin Kistner, gavin@refinery.com
//*** It is covered under the license viewable at http://phrogz.net/JS/_ReuseLicense.txt
//*** Reuse or modification is free provided you abide by the terms of that license.
//*** (Including the first two lines above in your source code satisfies the conditions.)


//***Cross browser attach event function. For 'evt' pass a string value with the leading "on" omitted
//***e.g. AttachEvent(window,'load',MyFunctionNameWithoutParenthesis,false);

function AttachEvent(obj,evt,fnc,useCapture){
	if (!useCapture) useCapture=false;
	if (obj.addEventListener){
		obj.addEventListener(evt,fnc,useCapture);
		return true;
	} else if (obj.attachEvent) return obj.attachEvent("on"+evt,fnc);
	else{
		MyAttachEvent(obj,evt,fnc);
		obj['on'+evt]=function(){ MyFireEvent(obj,evt) };
	}
} 

//The following are for browsers like NS4 or IE5Mac which don't support either
//attachEvent or addEventListener
function MyAttachEvent(obj,evt,fnc){
	if (!obj.myEvents) obj.myEvents={};
	if (!obj.myEvents[evt]) obj.myEvents[evt]=[];
	var evts = obj.myEvents[evt];
	evts[evts.length]=fnc;
}
function MyFireEvent(obj,evt){
	if (!obj || !obj.myEvents || !obj.myEvents[evt]) return;
	var evts = obj.myEvents[evt];
	for (var i=0,len=evts.length;i<len;i++) evts[i]();
}


// Cookie API  v1.0.1
// documentation: http://www.dithered.com/javascript/cookies/index.html
// license: http://creativecommons.org/licenses/by/1.0/
// code (mostly) by Chris Nott (chris[at]dithered[dot]com)


// Write a cookie value
function setCookie(name, value, expires, path, domain, secure) {
	var curCookie = name + '=' + escape(value) + ((expires) ? '; expires=' + expires.toGMTString() : '') + ((path) ? '; path=' + path : '') + ((domain) ? '; domain=' + domain : '') + ((secure) ? '; secure' : '');
	document.cookie = curCookie;
}


// Retrieve a named cookie value
function getCookie(name) {
	var dc = document.cookie;
	
	// find beginning of cookie value in document.cookie
	var prefix = name + "=";
	var begin = dc.indexOf("; " + prefix);
	if (begin == -1) {
		begin = dc.indexOf(prefix);
		if (begin != 0) return null;
	}
	else begin += 2;
	
	// find end of cookie value
	var end = document.cookie.indexOf(";", begin);
	if (end == -1) end = dc.length;
	
	// return cookie value
	return unescape(dc.substring(begin + prefix.length, end));
}


// Delete a named cookie value
function deleteCookie(name, path, domain) {
	var value = getCookie(name);
	if (value != null) document.cookie = name + '=' + ((path) ? '; path=' + path : '') + ((domain) ? '; domain=' + domain : '') + '; expires=Thu, 01-Jan-70 00:00:01 GMT';
	return value;
}


// Fix Netscape 2.x Date bug
function fixDate(date) {
	var workingDate = date;
	var base = new Date(0);
	var skew = base.getTime();
	if (skew > 0) workingDate.setTime(workingDate.getTime() - skew);
	return workingDate;
}


// Test for cookie support
function supportsCookies(rootPath) {
	setCookie('checking_for_cookie_support', 'testing123', '', (rootPath != null ? rootPath : ''));
	if (getCookie('checking_for_cookie_support')) return true;
	else return false;
}

//------------------------------------------------------------
var W3CDOM = (document.getElementsByTagName && document.createElement);

function addMsg(obj,message,classN)
{
	if (W3CDOM)
	{
		var sp = document.createElement("div");
		sp.className = classN;
		sp.appendChild(document.createTextNode(message));
		obj.parentNode.appendChild(sp);
		if (!obj.msgs)
			obj.msgs = new Array();
		obj.msgs[obj.msgs.length] = sp;
	}
}

function removeMsg(elm)
{
	if (W3CDOM)
	if (elm.msgs)
	{	
    	for (ti=0;ti<elm.msgs.length;ti++) {
        	//e = elm.msgs[ti];
			elm.parentNode.removeChild(elm.msgs[ti]);
			//elm.msgs[ti] = null;
		}
		elm.msgs = new Array();
	}
}
//------------------------------------------------------------
// Adobe Acrobat Detection  v1.0
// documentation: http://www.dithered.com/javascript/acrobat_detect/index.html
// license: http://creativecommons.org/licenses/by/1.0/
// code by Chris Nott (chris[at]dithered[dot]com)


var acrobatVersion = 0;
function getAcrobatVersion() {
	var agent = navigator.userAgent.toLowerCase(); 
	
	// NS3+, Opera3+, IE5+ Mac, Safari (support plugin array):  check for Acrobat plugin in plugin array
	if (navigator.plugins != null && navigator.plugins.length > 0) {
      for (i=0; i < navigator.plugins.length; i++ ) {
         var plugin = navigator.plugins[i];
         if (plugin.name.indexOf("Adobe Acrobat") > -1) {
            acrobatVersion = parseFloat(plugin.description.substring(30));
         }
      }
	}
   
	// IE4+ Win32:  attempt to create an ActiveX object using VBScript
	else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
	   document.write('<scr' + 'ipt language="VBScript"\> \n');
	   document.write('on error resume next \n');
		document.write('dim obAcrobat \n');
		document.write('set obAcrobat = CreateObject("PDF.PdfCtrl.5") \n');
		document.write('if IsObject(obAcrobat) then \n');
		document.write('acrobatVersion = 5 \n');
		document.write('else set obAcrobat = CreateObject("PDF.PdfCtrl.1") end if \n');
		document.write('if acrobatVersion < 5 and IsObject(obAcrobat) then \n');
		document.write('acrobatVersion = 4 \n');
		document.write('end if');
		document.write('</scr' + 'ipt\> \n');
  }

	// Can't detect in all other cases
	else {
		acrobatVersion = acrobatVersion_DONTKNOW;
	}

	return acrobatVersion;
}

acrobatVersion_DONTKNOW = -1;
//-------------------------------------------------------------------------
function getJavaVersion()
{
	jversion='0.0';
	
	var numPlugs=navigator.plugins.length;
	if (numPlugs)
	{
		for (var x=0; x<numPlugs; x++)
		{
			var pluginjava = navigator.plugins[x];
			//document.write(pluginjava.name.toLowerCase()+ "<br/>");
	
			if (pluginjava.name.toLowerCase().indexOf('java') != -1)
			{
				jversion=pluginjava.description.toLowerCase().split('java')[1];
				break;
			}
		}
	}
	return jversion;
}
//-------------------------------------------------------------------------
// Flash Version Detector  v1.2.1
// documentation: http://www.dithered.com/javascript/flash_detect/index.html
// license: http://creativecommons.org/licenses/by/1.0/
// code by Chris Nott (chris[at]dithered[dot]com)
// with VBScript code from Alastair Hamilton (now somewhat modified)


function isDefined(property) {
  return (typeof property != 'undefined');
}

var flashVersion = 0;
function getFlashVersion() {
	var latestFlashVersion = 8;
   var agent = navigator.userAgent.toLowerCase(); 
	
   // NS3 needs flashVersion to be a local variable
   if (agent.indexOf("mozilla/3") != -1 && agent.indexOf("msie") == -1) {
      flashVersion = 0;
   }
   
	// NS3+, Opera3+, IE5+ Mac (support plugin array):  check for Flash plugin in plugin array
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		var flashPlugin = navigator.plugins['Shockwave Flash'];
		if (typeof flashPlugin == 'object') { 
			for (var i = latestFlashVersion; i >= 3; i--) {
            if (flashPlugin.description.indexOf(i + '.') != -1) {
               flashVersion = i;
               break;
            }
         }
		}
	}

	// IE4+ Win32:  attempt to create an ActiveX object using VBScript
	else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
	   var doc = '<scr' + 'ipt language="VBScript"\> \n';
      doc += 'On Error Resume Next \n';
      doc += 'Dim obFlash \n';
      doc += 'For i = ' + latestFlashVersion + ' To 3 Step -1 \n';
      doc += '   Set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash." & i) \n';
      doc += '   If IsObject(obFlash) Then \n';
      doc += '      flashVersion = i \n';
      doc += '      Exit For \n';
      doc += '   End If \n';
      doc += 'Next \n';
      doc += '</scr' + 'ipt\> \n';
      document.write(doc);
   }
		
	// WebTV 2.5 supports flash 3
	else if (agent.indexOf("webtv/2.5") != -1) flashVersion = 3;

	// older WebTV supports flash 2
	else if (agent.indexOf("webtv") != -1) flashVersion = 2;

	// Can't detect in all other cases
	else {
		flashVersion = flashVersion_DONTKNOW;
	}

	return flashVersion;
}

flashVersion_DONTKNOW = -1;

//Detect Plugin (Flash, Java, RealPlayer etc) script- By Frederic (fw4@tvd.be)
//Visit http://javascriptkit.com for this script and more

var agt=navigator.userAgent.toLowerCase();
var ie  = (agt.indexOf("msie") != -1);
var ns  = (navigator.appName.indexOf("Netscape") != -1);
var win = ((agt.indexOf("win")!=-1) || (agt.indexOf("32bit")!=-1));
var mac = (agt.indexOf("mac")!=-1);

if (ie && win) {	pluginlist = detectIE("Adobe.SVGCtl","SVG Viewer") + detectIE("SWCtl.SWCtl.1","Shockwave Director") + detectIE("ShockwaveFlash.ShockwaveFlash.1","Shockwave Flash " + getFlashVersion()) + detectIE("rmocx.RealPlayer G2 Control.1","RealPlayer") + detectIE("QuickTimeCheckObject.QuickTimeCheck.1","QuickTime") + detectIE("MediaPlayer.MediaPlayer.1","Windows Media Player") + detectIE("PDF.PdfCtrl.5","Acrobat Reader " + getAcrobatVersion()); }
if (ns || !win) {
		nse = ""; for (var i=0;i<navigator.mimeTypes.length;i++) nse += navigator.mimeTypes[i].type.toLowerCase();
		pluginlist = detectNS("image/svg-xml","SVG Viewer") + detectNS("application/x-director","Shockwave Director") + detectNS("application/x-shockwave-flash","Shockwave Flash " + getFlashVersion()) + detectNS("audio/x-pn-realaudio-plugin","RealPlayer") + detectNS("video/quicktime","QuickTime") + detectNS("application/x-mplayer2","Windows Media Player") + detectNS("application/pdf","Acrobat Reader " + getAcrobatVersion());
}

function detectIE(ClassID,name) { result = false; document.write('<SCRIPT LANGUAGE=VBScript>\n on error resume next \n result = IsObject(CreateObject("' + ClassID + '"))</SCRIPT>\n'); if (result) return name+','; else return ''; }
function detectNS(ClassID,name) { n = ""; if (nse.indexOf(ClassID) != -1) if (navigator.mimeTypes[ClassID].enabledPlugin != null) n = name+","; return n; }

pluginlist += navigator.javaEnabled() ? "Java "+getJavaVersion()+ "," : "";
if (pluginlist.length > 0) pluginlist = pluginlist.substring(0,pluginlist.length-1);

//------------------------------------------------------------------
// Window properties  v1.1
// documentation: http://www.dithered.com/javascript/window_properties/index.html
// license: http://creativecommons.org/licenses/by/1.0/
// code by Chris Nott (chris[at]dithered[dot]com)


function getInnerWidth(win) {
  var winWidth;
  if (win.innerWidth) {
    winWidth = win.innerWidth;
  }
  else if (win.document.documentElement && win.document.documentElement.clientWidth) {
    winWidth = win.document.documentElement.clientWidth;
  }
  else if (document.body) {
    winWidth = win.document.body.clientWidth;
  }
  return winWidth;
}

function getInnerHeight(win) {
  var winHeight;
  if (win.innerHeight) {
    winHeight = win.innerHeight;
  }
  else if (win.document.documentElement && win.document.documentElement.clientHeight) {
    winHeight = win.document.documentElement.clientHeight;
  }
  else if (win.document.body) {
    winHeight = win.document.body.clientHeight;
  }
  return winHeight;
}

function getScrollTop(win) {
   var scrollTop = 0;
   if (win.pageYOffset) {
	   scrollTop = win.pageYOffset;
   }
   else if (win.document.documentElement && win.document.documentElement.scrollTop) {
	   scrollTop = win.document.body.scrollTop;
   }
   else if (win.document.body) {
      scrollTop = win.document.body.scrollTop;
   }
   return scrollTop;
}

function getScrollLeft(win) {
   var scrollLeft = 0;
   if (win.pageXOffset) {
	   scrollLeft = win.pageXOffset;
   }
   else if (win.document.documentElement && win.document.documentElement.scrollLeft) {
	   scrollLeft = win.document.body.scrollLeft;
   }
   else if (win.document.body) {
      scrollLeft = win.document.body.scrollLeft;
   }
   return scrollLeft;
}
//-------------------
// reloader 
function mxRe(cid)
{
	var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('browse')) ;
	sBasePath += "browse/" + cid;
	//alert(sBasePath);	
	window.location = sBasePath;
}
//-------------------
function prevSibling(e)
{
	if (browser.isIE)
	{
		var sibl = e.previousSibling;	
	}else{
		var sibl = e.previousSibling.previousSibling;	
	}
	return sibl;
}
function nextSibling(e)
{
	if (!browser.isIE)
	if (e.nextSibling.nextSibling)
	{
	 var sibl = e.nextSibling.nextSibling.nextSibling;
	}else{
     var sibl = n.firstChild;
	}	

	if (browser.isIE)
	if (e.nextSibling)
	{
	 var sibl = e.nextSibling.nextSibling;
	}else{
     var sibl = n.firstChild;
	}	
	
	return sibl;
}
/***********************************************
*
* Function : getColor
*
* Parameters : start - the start color (in the form "RRGGBB" e.g. "FF00AC")
* end - the end color (in the form "RRGGBB" e.g. "FF00AC")
* percent - the percent (0-100) of the fade between start & end
*
* returns : color in the form "#RRGGBB" e.g. "#FA13CE"
*
* Description : This is a utility function. Given a start and end color and
* a percentage fade it returns a color in between the 2 colors
*
* Author : www.JavaScript-FX.com
*
*************************************************/
function getFColor(start, end, percent)
{
var r1=hex2dec(start.slice(0,2));
var g1=hex2dec(start.slice(2,4));
var b1=hex2dec(start.slice(4,6));

var r2=hex2dec(end.slice(0,2));
var g2=hex2dec(end.slice(2,4));
var b2=hex2dec(end.slice(4,6));

var pc = percent/100;

r= Math.floor(r1+(pc*(r2-r1)) + .5);
g= Math.floor(g1+(pc*(g2-g1)) + .5);
b= Math.floor(b1+(pc*(b2-b1)) + .5);

return("#" + dec2hex(r) + dec2hex(g) + dec2hex(b));
}
/*** These are the simplest HEX/DEC conversion routines I could come up with ***/
/*** I have seen a lot of fade routines that seem to make this a ***/
/*** very complex task. I am sure somene else must've had this idea ***/
var hexDigit=new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");
function dec2hex(dec){return(hexDigit[dec>>4]+hexDigit[dec&15]);}
function hex2dec(hex){return(parseInt(hex,16))}
/************************************************/


function debugw(amsg)
{
	//document.write('<div id="debug">Moo</div>');
}
