﻿function SetPopup()
{
		var w, h, fixedW, fixedH, diffW, diffH;

		if (document.all) {
				fixedW = document.body.clientWidth;
				fixedH = document.body.clientHeight;
				window.resizeTo(fixedW, fixedH);
				diffW = fixedW - document.body.clientWidth;
				diffH = fixedH - document.body.clientHeight;
		} else {
				fixedW = window.innerWidth;
				fixedH = window.innerHeight;
				window.resizeTo(fixedW, fixedH);
				diffW = fixedW - window.innerWidth;
				diffH = fixedH - window.innerHeight;
		}

		w = fixedW + diffW;
		h = fixedH + diffH;
		if (h >= screen.availHeight) w += 16;
		if (w >= screen.availWidth)  h += 16;
		w = Math.min(w,screen.availWidth);
		h = Math.min(h,screen.availHeight);
		window.resizeTo(w,h);
		window.moveTo((screen.availWidth-w)/2, (screen.availHeight-h)/2);			
}
function LoadImg(sFullImgSrc)
{
    try{
	    var oFullImg	= document.getElementById("FullImg");
	    oFullImg.src	= sFullImgSrc;
	    oFullImg.filters[0].Apply();
	    oFullImg.filters[0].Play(duration=2);
	}catch(e){
	    window.status = e.description;
	}
}
function ShowHide(iShowHide)
{
    try
    {
	    var sDisplay	= "block";
	    var sIcon		= "img/arrow_up.gif";
		
	    var oTbl	        = document.getElementById("PopUpNavigationTable");
	    
	    window.status = oTbl.style.display;
		
		if(oTbl.style.display == "none" && iShowHide == 0)  return;
		
	    if(oTbl.style.display == "block" || iShowHide == 0)
	    {
	        if(iShowHide != 1)
	        {
		        sDisplay	= "none";
		        sIcon		= "img/arrow_down.gif";
		    }
	    }
	    
	    var oArrowImg       = document.getElementById("ArrowImg");		   
	    ArrowImg.src	    = sIcon;
	    
	    oTbl.style.display	= sDisplay;	
		
    }
    catch(e)
    {
	    window.status= "ShowHide-ERROR->"+e.description;
    }
}
