// JavaScript Document

popupp = function()
{
	clearID=null;
	m = document.createElement('div');
	m.style.position = "absolute";
	m.style.border = "4px solid #CCCCCC";
	m.style.backgroundColor = "#EEEEEE";
	
	n = document.createElement('img');
	n.border = 0;

	m.appendChild(n);
	document.body.appendChild(m);
	
	m.style.display = "none";
	
	n.onload = function()
	{   
		m.style.display = "";
		setTimeout("loa();",50)
	}	

	loa = function()
	{
		z = (window.innerHeight) ? window.innerHeight : (document.documentElement.clientHeight ? document.documentElement.clientHeight: document.body.clientHeight);
		try{h1=m.clientHeight;}
		catch(e){h1=m.getHeight();}
		
		try{scrl=document.body.scrollTop;}
		catch(e){}

		try{scrl=Position.realOffset(document.body)[1];}
		catch(e){}

		if (Prototype.Browser.Opera) 
		{
		try{scrl=document.body.scrollTop;}
		catch(e){}
		
		if (scrl==0)
			{
			try{scrl=Position.realOffset(document.body)[1];}
			catch(e){}
			}
		}

//alert("z:"+z+" h1:"+h1+" scrl:"+scrl);

		m.style.top = scrl + (z - h1)/2 +"px";	
	}

	this.show = function(elem,imagename,follow)
	{
		//alert("Cucu");
		clearTimeout(clearID);
		n.src = imagename;
		pos_ar = Position.cumulativeOffset(elem.offsetParent);
		m.style.left = pos_ar[0]+133+4+4+2+"px";

		elem.onmouseout = function()
		{
			clearID = setTimeout('m.style.display = "none";',400);
		}
	}

};

/*
tinyMCE.init({
	language : "en",
	mode : "exact",
	elements : "artist_description{OTHER_TEXTAREAS}",
	theme : "reea",
	plugins: "advlink,contextmenu",
	theme_advanced_buttons2_add : "forecolor,backcolor",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_path_location : "bottom",
	plugin_insertdate_dateFormat : "%Y-%m-%d",
	plugin_insertdate_timeFormat : "%H:%M:%S",
	convert_urls : false,
	verify_html : true,
	apply_source_formatting : true,
	theme_advanced_path: false
});
*/

function openSubWin(strURL, pixW, pixH)
{
    strLocation = strURL;
    strWHandle = "sdcSubWin";
    strProps = "resizable=no,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,width=" + pixW + ",height=" + pixH + ",top=30,left=30";
    f=window.open(strLocation, strWHandle, strProps);
    f.focus();
}

function openSubWin2(strURL, pixW, pixH)
{
    strLocation = strURL;
    strWHandle = "sdcSubWin2";
    strProps = "resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,width=" + pixW + ",height=" + pixH + ",top=30,left=30";
    f=window.open(strLocation, strWHandle, strProps);
    f.focus();
}

function openSubWin(strURL, pixW, pixH, handlerext)
{
    strLocation = strURL;
    strWHandle = "sdcSubWin"+handlerext;
    strProps = "resizable=no,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,width=" + pixW + ",height=" + pixH + ",top=30,left=30";
    f=window.open(strLocation, strWHandle, strProps);
    f.focus();
}
