/***********************************************
* Fixed ToolTip script- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
		
var tipwidth='150px' //default tooltip width
var tipbgcolor='#EBFFE3'  //tooltip bgcolor
var disappeardelay=250  //tooltip disappear speed onMouseout (in miliseconds)
var vertical_offset="-65px" //horizontal offset of tooltip from anchor link
var horizontal_offset="100px" //horizontal offset of tooltip from anchor link

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div style="position:relative;width:973px;margin:0 auto; "height:1> <div id="fixedtipdiv" style=" right:-94px;visibility:hidden;width:'+tipwidth+';background-color:'+tipbgcolor+'" ></div></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, tipwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (tipwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=tipwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=(whichedge=="rightedge")? parseInt(horizontal_offset)*-1 : parseInt(vertical_offset)*-1
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
}
return edgeoffset
}

function fixedtooltip(menucontents, obj, e, tipwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidetip()
dropmenuobj=document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv
dropmenuobj.innerHTML=menucontents

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth)
//dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
//dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}
}

function hidetip(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidetip(){
if (ie4||ns6)
delayhide=setTimeout("hidetip()",disappeardelay)
}

function clearhidetip(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}


/*
 * Display popup box
 */
function show_box(src,fwidth,fheight,dwidth,dheight)
{  
   
   TH = jQuery(window).height();
   TW = jQuery(window).width();
	//alert( TH + " ; " + TW);
    
  
   
   document.getElementById('light').style.display='block';
  
   maxHeight = Math.floor(0.80 * TH); 
   maxWidth = Math.floor(0.70 * TW);
	
	if(  parseInt(dwidth) > maxWidth) dwidth = maxWidth;
	if(  parseInt(dheight) > maxHeight) dheight = maxHeight;

	if(  parseInt(fwidth) > maxWidth) fwidth = maxWidth;
	if(  parseInt(fheight) > maxHeight) fheight = maxHeight;

   jQuery("#modalIframeId").css("width",fwidth);
   jQuery("#modalIframeId").css("height",fheight);
   
   
 
   jQuery("#light").css("width",dwidth);
   jQuery("#light").css("height",dheight);
   
   // Control positioning 
   //var TH = 0;  
   Width = (parseInt(TW) - parseInt(dwidth))/2;
   reqWidth = parseInt(Width)
   Height = (parseInt(TH) - parseInt(dheight))/2;
   reqHeight = parseInt(Height)
   document.getElementById('light').style.left = reqWidth + 'px';  
	document.getElementById('light').style.top = (jQuery(window).scrollTop()+reqHeight) + 'px';	  
   
 
 	jQuery("#light").css('top',  (TH-fheight)/2);  
	jQuery("#light").css('left', (TW-fwidth)/2);  
   
 
   
  return false;
}

/*
 * Close popup box
 */
function closeWindow(){
     
   	
	//jQuery("#modalIframeId").css("display","none"); 	
	
	document.getElementById('light').style.display='none';
	
	
	

}
function setUrl(url)
{
  window.location.href =url;
}

