// JavaScript Document

function xx_set_visible(id, e, value){
	if (!xx_supported_client()) return ;
	xx_get_by_id(id).style.visibility= value ? "visible" : "hidden";
	if(value) xx_move_tag(id,e);
	xx_get_by_id(id).style.display=value ? "" : "none";
}

function xx_move_tag(id,e){
	if (!xx_supported_client()) return ;
	var popup = xx_get_by_id(id);
	if (popup.style.visibility!="visible") return ;

	var ns6=document.getElementById && !document.all
	var ie=document.all

	var iebody = (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;

    var dx = 10, dy = 10;
 	var posX=(ns6)?e.pageX : event.x+iebody.scrollLeft;
	var posY=(ns6)?e.pageY : event.y+iebody.scrollTop;

	var rightedge=ie&&!window.opera? iebody.clientWidth-event.clientX: window.innerWidth-e.clientX-20
	var bottomedge=ie&&!window.opera? iebody.clientHeight-event.clientY : window.innerHeight-e.clientY-20

	if (rightedge-dx<popup.offsetWidth)
		posX=ie? iebody.scrollLeft+event.clientX-popup.offsetWidth : window.pageXOffset+e.clientX-popup.offsetWidth;

	if (bottomedge-dy<popup.offsetHeight) {
		posY=ie? iebody.scrollTop+event.clientY-popup.offsetHeight : window.pageYOffset+e.clientY-popup.offsetHeight;
		dy =-dy;
    }

    popup.style.left=posX+dx+"px";
    popup.style.top=posY+dy+"px";

}

function xx_supported_client() { 	return (document.all) || (document.getElementById);}
function xx_get_by_id(id) { return document.all? document.all[id]: document.getElementById? document.getElementById(id) : "" }




function MM_CheckFlashVersion(reqVerStr,msg){
  with(navigator){
    var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
    if (!isIE || !isWin){  
      var flashVer = -1;
      if (plugins && plugins.length > 0){
        var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
        desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
        if (desc == "") flashVer = -1;
        else{
          var descArr = desc.split(" ");
          var tempArrMajor = descArr[2].split(".");
          var verMajor = tempArrMajor[0];
          var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
          var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
          flashVer =  parseFloat(verMajor + "." + verMinor);
        }
      }
      // WebTV has Flash Player 4 or lower -- too low for video
      else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;

      var verArr = reqVerStr.split(",");
      var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
  
      if (flashVer < reqVer){
        if (confirm(msg))
          window.location = "http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
      }
    }
  } 
}

<!--
function createDirectRequestObject () {
	var xmlhttp=false;
	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
	// JScript gives us Conditional compilation, we can cope with old IE versions.
	// and security blocked creation of the objects.
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
	 	try {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	  	} catch (E) {
	   		xmlhttp = false;
	  	}
	}
	@end @*/
	
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		xmlhttp = new XMLHttpRequest();
	}
	
	return xmlhttp;
}

function loadNewFragment(targetURL, targetDivID, callbackFunc, startingFunc) {
	
	//If the user has supplied a function to be called when the transaction starts, then call it now
	if (startingFunc != null) {
		try {
			startingFunc(targetDivID);
		} catch (e) {
			
		}
	}
	
	//Create the request object
	var xmlHttpObj = createDirectRequestObject();
	
	//Create the callback
	xmlHttpObj.onreadystatechange = function () {
			if (xmlHttpObj.readyState == 4) {

				targetDiv = document.getElementById(targetDivID);
				
				if (targetDiv) {
					try {
						targetDiv.innerHTML = xmlHttpObj.responseText;
				
				
						//Execute script tags
						var scriptTags = targetDiv.getElementsByTagName("script");
						for (var f=0; f < scriptTags.length; f++) {
							 window.eval(scriptTags.item(f).firstChild.nodeValue);
							 
						}
					} catch (e) {
						
					}
				}
				
				//If the user supplies a function to be called when the transaction completes, call it now.
				if (callbackFunc != null) {
					try {
						callbackFunc(targetDivID);
					} catch (e) {
					
					}
				}
				
				//xmlHttpObj = null;
			}
	}
	
	//Begin the transaction
	xmlHttpObj.open("GET", targetURL, true);
	xmlHttpObj.send("");
	
}
//-->

