/*©*/

var json_1={after:{canover:false,finished:false,nv:true}}
var json_2={after:{canover:false,finished:false,nv:true}}
var json_3={after:{canover:false,finished:false,nv:true}}
var json_4={after:{canover:false,finished:false,nv:true}}
var current = '',timer = new Array(),hold = new Array(),dlgObj = $('pop-1'),oDmove= $('tmove'),Left,Top
function doPop(sn,t){
	var json = eval('json_'+sn)
	clearTimeout(timer[sn])
	if(!json.after.canover){
		new Effect.Grow('pop-'+sn,json)
		if(json.after.nv){
			if(!t)$('pop-'+sn).getElementsByTagName('img')[0].src=$('pop-'+sn).getElementsByTagName('img')[0].src.replace('.gif','.png')
			json.after.nv = false
		}
	}
}
function doTimeout(sn){
	var json = eval('json_'+sn)
	timer[sn] = setTimeout(function(){doClear(sn)},1000)
	if(!json.after.canover)new Effect.Grow('pop-'+sn,json)
}
function doClear(sn){
	var json = eval('json_'+sn)
	if(json.after.finished && !hold[sn]){new Effect.Squish('pop-'+sn,json);if(oDmove){oDmove.innerHTML ='';new Effect.Squish(oDmove,json)}}
}
function clearHold(sn){
	hold[sn] = false
	doClear(sn)
}
function doPopHold(sn){
	hold[sn] = true
}

window.onresize = function(ev){
	var tInfo = getViewportInfo()
	if(!oDmove)return
	Left=(document.body.clientWidth-oDmove.clientWidth)/2+document.body.scrollLeft;
	Top=(oDmove.clientHeight)/2+document.documentElement.scrollTop+50;
	var dH = (document.documentElement.scrollHeight > document.body.clientHeight)?document.documentElement.scrollHeight:document.body.clientHeight
	oDmove.style.top = Top +'px';
	oDmove.style.left =  Left +'px';
	dlgObj.style.width = document.body.scrollWidth +'px';
	dlgObj.style.height =  dH +'px';
}
function getViewportInfo()
{
	var w = (window.innerWidth) ? window.innerWidth : (document.documentElement && document.documentElement.clientWidth) ? document.documentElement.clientWidth : document.body.offsetWidth;
	var h = (window.innerHeight) ? window.innerHeight : (document.documentElement && document.documentElement.clientHeight) ? document.documentElement.clientHeight : document.body.offsetHeight;
	return {w:w,h:h};
}
