function menuOnMouseOver(tdLeftMenu, tdMenu, tdRightMenu)
{
	tdLeftMenu.style.background = "#C8F2FD";
	tdMenu.style.background = "#C8F2FD";
	if(tdRightMenu.id != "tdLMenu5")
		tdRightMenu.style.borderLeft = "1px solid #C8F2FD";
	else
		tdRightMenu.style.background = "#C8F2FD";	
}
function menuOnMouseOut(tdLeftMenu, tdMenu, tdRightMenu)
{
	tdLeftMenu.style.background = "Transparent";
	tdMenu.style.background = "Transparent";
	if(tdRightMenu.id != "tdLMenu5")
		tdRightMenu.style.borderLeft = "";
	else
		tdRightMenu.style.background = "Transparent";	
	
}

function menuOnMouseOverNew(tdMenu)
{
	tdMenu.style.background = "Transparent url(/Img/Main/Scene/top_btn_bg_down.jpg) no-repeat left bottom";
}
function menuOnMouseOutNew(tdMenu)
{
	tdMenu.style.background = "Transparent url(/Img/Main/Scene/top_btn_bg_up.png) no-repeat left bottom";
}

function menuOnMouseOverNew1(tdMenu)
{
	tdMenu.style.background = "#FED57C";
}
function menuOnMouseOutNew1(tdMenu)
{
	tdMenu.style.background = "Transparent";
}

function menuOnMouseOverNew2(tdMenu)
{
	tdMenu.style.background = "url(/Img/1pxBlueT.png) repeat left top";
}
function menuOnMouseOutNew2(tdMenu)
{
	tdMenu.style.background = "Transparent";
}



function ShowMyHintF(MyHintId, event, event_element, position)
{ 
	if(MyHintId.style.visibility == 'hidden')
	{
		if(!event)
			event=window.event; 

		/*r=getAbsolutePos(event_element);
		_x=r.x;
		_y=r.y;
		
		if(position==1)
		{
			_x= (_x-MyHintId.clientWidth-10);
		}
		if(position==2)
		{
			_x= (_x+event_element.clientWidth+10);
		}

		if(_y+MyHintId.clientHeight > document.body.clientHeight+document.body.scrollTop-25)
			_y=document.body.clientHeight+document.body.scrollTop-MyHintId.clientHeight-25;
		*/
		
		
		 _x=event.clientX;
		 _y=event.clientY;
		//event_element=((event.target) ? event.target : event.srcElement);
		
		if(position==1)
		{
			_x= (_x-MyHintId.clientWidth-10);
		}
		if(position==2)
		{
			_x= (_x+10);
		}

		if(_y+MyHintId.clientHeight > document.body.clientHeight-25)
			_y=document.body.clientHeight-MyHintId.clientHeight-25;
		_y=_y+document.body.scrollTop;
			
		
		MyHintId.style.left=_x;
		MyHintId.style.top=_y;
		
		MyHintId.style.visibility='visible'; 
	}

}

function ShowMyHint(MyHintId, event, event_element, position)
{ 
	if(MyHintId.style.visibility == 'hidden')
	{
		/*if(!event)
			event=window.event; 
		event_object=((event.target) ? event.target : event.srcElement);	*/

		var r=getElementPosition(event_element);
		var _x=r.left;
		var _y=r.top;
		
		if(position==1)
		{
			_x= (_x-MyHintId.clientWidth-15);
		}
		if(position==2)
		{
			_x= (_x+event_element.clientWidth+15);
		}

		if(_y+MyHintId.clientHeight > document.body.clientHeight+document.body.scrollTop-25)
			_y=document.body.clientHeight+document.body.scrollTop-MyHintId.clientHeight-25;
		
		MyHintId.style.left=_x;
		MyHintId.style.top=_y;
		
		MyHintId.style.visibility='visible'; 
	}

}

function HideMyHint(MyHintId)
{ 
MyHintId.style.visibility="hidden"; 
//MyHintId.innerHTML=""; 
MyHintId.style.top=0; 
MyHintId.style.left=0; 
}

function getAbsolutePos(el)
{
	var r = { x: el.offsetLeft, y: el.offsetTop };
	if (el.offsetParent)
		{
		var tmp = getAbsolutePos(el.offsetParent);
		r.x += tmp.x;
		r.y += tmp.y;
		}
	return r;
}

function getElementPosition(elemId)
{
    var elem = document.getElementById(elemId);
	//var elem = elemId;
    
    var w = elem.offsetWidth;
    var h = elem.offsetHeight;
    
    var l = 0;
    var t = 0;
    
    while (elem)
    {
        l += elem.offsetLeft;
        t += elem.offsetTop;
        elem = elem.offsetParent;
    }

    return {"left":l, "top":t, "width": w, "height":h};
}

function ShowImageAsImageBackground(image_id, image_src)
{
	var temp_str = "";
	temp_str = "Transparent url(/Includes/ClassLib/Utils/PrintImage.php?Logo=1&Fill=0&W=450&H=285&File="+image_src+") no-repeat center center";
	image_id.style.background = "";
	image_id.style.background = temp_str;		
}
function ShowImageAsImageBackground1(image_id, image_src)
{
	var temp_str = "";
	temp_str = "Transparent url(/Includes/ClassLib/Utils/PrintImage.php?Logo=1&Fill=0&W="+document.getElementById(image_id).style.width+"&H="+document.getElementById(image_id).style.width+"&File="+image_src+") no-repeat center center";
	document.getElementById(image_id).style.background = "";
	document.getElementById(image_id).style.background = temp_str;		
}

function getfullheight()
{
	var FullHeight;
	FullHeight=(document.body.clientHeight>document.body.scrollHeight)?document.body.scrollHeight:document.body.clientHeight;	
	return FullHeight;
}

function resize(object_id, size1, size2)
{
	var id_slider_height;
	
	if(getfullheight()<800)
		id_slider_height=size2;
	else
		id_slider_height=size1;
	
	//object_id.style.height=id_slider_height+'px';
	
	document.getElementById(object_id).style.height=id_slider_height+'px';
	
} 

