arImageSrc = new Array ("/images/loading.gif","/images/loaded2.gif");

arImageList = new Array ();

for (counter in arImageSrc) {

arImageList[counter] = new Image();

arImageList[counter].src = arImageSrc[counter];

}

var height = screen.height;

var width = screen.width;

var leftpos = width / 2 - 250;

var toppos = height / 2 - 10;

function encode(str){ // Netscape fix thanks to Cyanide_7

return escape(str.replace('+','%20'));

}

function view(url,what,ref,titol) {

var url = url+'&titol='+titol+'&pic='+encode(what)+'&ref='+ref;

window.open(url,'WIN','scrollbars=no,status=no,toolbar=no,resizable=no,location=no,menu=no,width=500,height=30,left=' + leftpos + ',top=' + toppos);

}

function getParams() {

var idx = document.URL.indexOf('?');

var params = new Array();

if (idx != -1) {

var pairs = document.URL.substring(idx+1, document.URL.length).split('&');

for (var i=0; i<pairs.length; i++) {

nameVal = pairs[i].split('=');

params[nameVal[0]] = nameVal[1];

//alert(nameVal);

   }

}

return params;

}

params = getParams();

function resize() {
	if (eval(pic).height) {
	var name = navigator.appName
		if (name == "Microsoft Internet Explorer") {
			myHeight = eval(pic).height + 140;
			myWidth = eval(pic).width + 10;
		}
		else {
			myHeight = eval(pic).height + 9;
			myWidth = eval(pic).width;
		}

/////////////
myHeight = 615;
myWidth =650;
/////////////

	clearTimeout();

	var height = screen.height;
var width = screen.width;

var leftpos = width / 2 - myWidth / 2;
var toppos = height / 2 - myHeight / 2; 
self.moveTo(leftpos, toppos);
self.resizeTo(myWidth, myHeight);
document.il.src = '/images/loaded2.gif';
	}

	else setTimeOut(resize(), 10000);

	}


