var oDivWidth = 0
var oDivHeight = 0
var counter = 0
var strURL = ""
var tempX = 0
var tempY = 0


	function getMouseXY(){
		try{
			tempX = event.clientX + document.body.scrollLeft-100
			tempY = event.clientY + document.body.scrollTop-20
			
			if(document.body.clientWidth-event.clientX>430){
				posionControl = "right"
				document.getElementById("obTable01").background = "../files/images/layout/layout_bg_ltr.png"
				document.getElementById("myText2").style.direction = "ltr"
			}else{
				posionControl = "left"
				document.getElementById("obTable01").background = "../files/images/layout/layout_bg_rtl.png"
				document.getElementById("myText2").style.direction = "rtl"
			}
			if(tempY<120){tempY=120}
			
			
		}catch(e){
			tempX = Event.MOUSEMOVE.pageX
   			tempY = Event.MOUSEMOVE.pageY
		}
	}
	var Control12 = false
	function setMyDiv(url){
		counter = 0
		getMouseXY();
		
		var oDiv = document.getElementById("myShaperDiv")
		
		oDiv.style.visibility = "hidden"
		document.getElementById("myContent").style.visibility="hidden"; 
		oDivWidth = 0
		oDivHeight = 0
		counter = 0
		
		oDiv.style.visibility = "visible"
		oDiv.style.border = "2px solid #808080"
		oDiv.style.left = tempX
		oDiv.style.top = tempY
		strURL = url
		if(Control12==false){
			showTimeMyDiv();
		}else{
			return false;
		}
	}
	
	function showTimeMyDiv(){
		Control12 = true
		counter = counter + 1
		var oDiv = document.getElementById("myShaperDiv")
		oDivWidth = oDivWidth + 20
		oDivHeight = oDivHeight + 14
		
		if(posionControl=="right"){
			tempX = tempX + 10
		}else{
			tempX = tempX - 19
		}
		
		tempY = tempY - 8
		
		oDiv.style.left = tempX
		oDiv.style.top = tempY
		oDiv.style.width = oDivWidth
		oDiv.style.height = oDivHeight
		
		if(counter<15){
			setTimeout("showTimeMyDiv()", 4);
		}else{
			//if (window.showHelp){
				//document.getElementById("myContent").style.filter = "progid:DXImageTransform.Microsoft.Fade(duration=1.5,overlap=1.2)"
				//document.getElementById("myContent").filters[0].Apply();
			//}
			document.getElementById("myContent").style.visibility="visible"; 
			document.getElementById("myText").innerHTML = getContent(strURL)
			//if (window.showHelp){
				//document.getElementById("myContent").filters[0].Play();
			//}
			oDiv.style.border = "0px"
			counter = 0
			Control12 = false
		}
	}

	function closeMyDiv(){
		counter = counter + 1
		var oDiv = document.getElementById("myShaperDiv")
		document.getElementById("myContent").style.visibility="hidden"; 
		
		oDiv.style.border = "2px solid #808080"
		
		oDivWidth = oDivWidth - 20
		oDivHeight = oDivHeight - 14
		
		if(posionControl=="right"){
			tempX = tempX - 10
		}else{
			tempX = tempX + 19
		}
		tempY = tempY + 8
		
		oDiv.style.left = tempX
		oDiv.style.top = tempY
		if(oDivWidth<0){oDivWidth=20}
		if(oDivHeight<0){oDivHeight=20}
		oDiv.style.width = oDivWidth
		oDiv.style.height = oDivHeight
		
		if(counter<15){
			setTimeout("closeMyDiv()", 4);
		}else{
			oDiv.style.border = "0px"
		}
		
	}
	
	function getContent(url){
		var d = new Date()
		url = url + "&d=" + d.getTime()
		oxmlhttp = null;
			try
			{ oxmlhttp = new XMLHttpRequest();
			oxmlhttp.overrideMimeType("text/xml");
			}
			catch(e)
			{ try
			{ oxmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch(e){
			return null;
			}
			}
			if(!oxmlhttp) return null;
			try{ 
				oxmlhttp.open("GET",url,false);
				oxmlhttp.send(null);
			}
			catch(e)
			{ 
				return null;
			}
			return oxmlhttp.responseText
			
		}
	