// JavaScript Document

if (document.images)
{
	Image1= new Image(768,246)
	Image1.src = "images/logo_top.jpg"
	Image2= new Image(145,79)
	Image2.src = "images/love_quiz.gif"
	Image3= new Image(196,12)
	Image3.src = "images/nav_topbtm.gif"
	Image4= new Image(155,12)
	Image4.src = "images/story_topbtm.gif"
	Image5= new Image(119,168)
	Image5.src = "images/home_control.gif"
	Image6= new Image(876,50)
	Image6.src = "images/main_back.gif"
}

function xstooltip_findPosX(obj) 
{
  var curleft = 0;
  if (obj.offsetParent) 
  {
    while (obj.offsetParent) 
        {
            curleft += obj.offsetLeft
            obj = obj.offsetParent;
        }
    }
    else if (obj.x)
        curleft += obj.x;
    return curleft;
}
function xstooltip_findPosY(obj) 
{
    var curtop = 0;
    if (obj.offsetParent) 
    {
        while (obj.offsetParent) 
        {
            curtop += obj.offsetTop
            obj = obj.offsetParent;
        }
    }
    else if (obj.y)
        curtop += obj.y;
    return curtop;
}
function xstooltip_show(tooltipId, parentId, posX, posY) //startdiv ny addition
{
    it = document.getElementById(tooltipId);
	
    if ((it.style.top == '' || it.style.top == 0) 
        && (it.style.left == '' || it.style.left == 0))
    {
        // need to fixate default size (MSIE problem)
        it.style.width = it.offsetWidth + 'px';
        it.style.height = it.offsetHeight + 'px';
        
        lnk_elmnt = document.getElementById(parentId); 
    
        // if tooltip is too wide, shift left to be within parent 
        // if (posX + it.offsetWidth > lnk_elmnt.offsetWidth) posX = lnk_elmnt.offsetWidth - it.offsetWidth;
        // if (posX < 0 ) posX = 0; 
        
        x = xstooltip_findPosX(lnk_elmnt) + posX; 
        y = xstooltip_findPosY(lnk_elmnt) + posY;
        
        it.style.top = y + 'px';
        it.style.left = posX + 'px';
	
    }
    
    it.style.visibility = 'visible'; 
}
function xstooltip_hide(id)
{
	it = document.getElementById(id); 
	it.style.visibility = 'hidden'; 
}
function load_logomovie()
{
	var flashvars = false;
	var params = {
	  quality: "high", 
	  wmode: "transparent" 
	}; 
    var attributes = {};
    swfobject.embedSWF("flash/hearts.swf", "anim", "173", "152", "6","flash/expressInstall.swf",flashvars,params,attributes); 

	if (document.images)
	{
		Image1= new Image(551,143)
		Image1.src = "images/top_lis3.jpg"
		Image2= new Image(768,143)
		Image2.src = "images/logo_un.gif"		
		Image3= new Image(218,264)
		Image3.src = "images/control1.gif"
		Image4= new Image(252,192)
		Image4.src = "images/control2.gif"
	}
}

function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=390,height=337,scrollbars=NO'); 
return false;
}

function popup2(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=420,height=550,scrollbars=YES'); 
return false;
}