// JavaScript Document
	//<![CDATA[
	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');



	var maxPopupheight = 6000;



	var maxPopupwidth = 6000;



	//var popupurl = 'http://www.baringo.se/projekt/ebay/load.html'; // http://kampanj.tradera.com/dokumentation/salja/Steg1.html



	var IFrameDoc;



	//var oldurl = "";



	function openPopupiframe(popurl)



	{



		//alert("oldurl");



	//	oldurl = window.frames['ifrmPopup'].window.location;



				



		window.frames['ifrmPopup'].window.location.replace(popurl); // showPopupiframe() below is called from iframe location



		//alert("hsha");



		CheckDocument()



		



		return true;



	}



	



	function CheckDocument(){

	//	alert("NU ÄR DEN: "+window.frames['ifrmPopup'].window.document.documentElement.offsetHeight);



		//window.frames['ifrmPopup'].window.location.onload



		//alert(window.frames['ifrmPopup'].window.location);



		//alert(window.frames['ifrmPopup'].window.location);window.frames['ifrmPopup'].window.location != "about:blank"



	



		ifrm = document.getElementById('ifrmPopup');



			if(ifrm.contentDocument)



				IFrameDoc = ifrm.contentDocument; 



			else if(ifrm.contentWindow)



				IFrameDoc = ifrm.contentWindow.document;



			else if(ifrm.document)



				IFrameDoc = ifrm.document;

		//alert(IFrameDoc.body.innerHTML);



		if(IFrameDoc.body.innerHTML){



			resizePopup();



		}else{



			setTimeout('CheckDocument()',200);



		}	



	}



	



	var saveW=0;



	var saveH=0;



	var popupOpen=0;



	function showPopupiframe(w,h)



	{



		



		popupOpen=1;



		if(!w && saveW)w = saveW;



		else if(w)saveW=w;



		if(!h && saveH)h = saveH;



		else if(h)saveH=h;



		



		if(document.documentElement && document.documentElement.clientWidth) {



			var docwidth = document.documentElement.clientWidth;



			var docheight = document.documentElement.clientHeight;



			var wintop = document.documentElement.scrollTop;



			var scrlheight = document.documentElement.scrollHeight;



		}



		else if (document.body) {



			var docwidth = document.body.clientWidth;



			var docheight = document.body.clientHeight;



			var wintop = document.body.scrollTop;



			var scrlheight = document.body.scrollHeight;



		}		



		



		var popW = (w>maxPopupwidth) ? maxPopupwidth : w;



		var popH = (h>maxPopupheight) ? maxPopupheight : h;



		



		popH += parseInt(document.getElementById('divPopupHead').offsetHeight);



		var toppos = wintop;



		toppos += ((docheight - popH)/2);



		var leftpos = ((docwidth - popW)/2);



		



		document.getElementById('divPopupBG').style.display = 'block';



		document.getElementById('ifrmContainer').style.height = popH + 'px';



		document.getElementById('ifrmContainer').style.width = popW + 'px';



		document.getElementById('ifrmContainer').style.top = toppos + 'px';



		document.getElementById('ifrmContainer').style.left =  leftpos + 'px';



		document.getElementById('ifrmContainer').style.visibility = 'visible';



		



		document.getElementById('ifrmPopup').style.height = (popH-document.getElementById('divPopupHead').offsetHeight) + 'px';



		document.getElementById('ifrmPopup').style.width = popW + 'px';



		var bgh = (scrlheight>docheight) ? scrlheight : docheight;



		document.getElementById('divPopupBG').style.height = bgh+'px';



		return false;



	}



	



	window.onresize=function(){if(popupOpen)showPopupiframe(0,0);};



	



	function closePopupiframe()



	{



		popupOpen=0;



		document.getElementById('divPopupBG').style.display = 'none';



		document.getElementById('ifrmContainer').style.visibility = 'hidden';



		window.frames['ifrmPopup'].window.location.replace('about:blank');



		saveW=saveH=0;



		return false;



	}



	// -->



	



	



	function resizePopup()



	{



	if(IFrameDoc.body) {



		var sW = parseInt(IFrameDoc.body.scrollWidth);



		var sH = parseInt(IFrameDoc.body.scrollHeight);



		var oW = parseInt(IFrameDoc.body.offsetWidth);



		var oH = parseInt(IFrameDoc.body.offsetHeight);



	}



	



	else if(IFrameDoc.getElementById('ifrmPopup').document.body) {



		var sW = parseInt(IFrameDoc.getElementById('ifrmPopup').document.document.body.scrollWidth);



		var sH = parseInt(IFrameDoc.getElementById('ifrmPopup').document.document.body.scrollHeight);



		var oW = parseInt(IFrameDoc.getElementById('ifrmPopup').document.document.body.offsetWidth);



		var oH = parseInt(IFrameDoc.getElementById('ifrmPopup').document.document.body.offsetHeight);



	}



	/*



	if(window.frames['ifrmPopup'].window.document.documentElement) {



		alert("KONSTIGT");



		var sW = parseInt(window.frames['ifrmPopup'].window.document.documentElement.scrollWidth);



		var sH = parseInt(window.frames['ifrmPopup'].window.document.documentElement.scrollHeight);



		var oW = parseInt(window.frames['ifrmPopup'].window.document.documentElement.offsetWidth);



		var oH = parseInt(window.frames['ifrmPopup'].window.document.documentElement.offsetHeight);



	}



	



	else if(window.frames['ifrmPopup'].window.document.getElementById('ifrmPopup').document.body) {



		alert("VA FAN");



		var sW = parseInt(window.frames['ifrmPopup'].window.document.getElementById('ifrmPopup').document.document.body.scrollWidth);



		var sH = parseInt(window.frames['ifrmPopup'].window.document.getElementById('ifrmPopup').document.document.body.scrollHeight);



		var oW = parseInt(window.frames['ifrmPopup'].window.document.getElementById('ifrmPopup').document.document.body.offsetWidth);



		var oH = parseInt(window.frames['ifrmPopup'].window.document.getElementById('ifrmPopup').document.document.body.offsetHeight);



	}



	*/



	var docwidth2 = (parent.rslt==null) ? oW : sW;



	var docheight2 = (parent.rslt==null) ? oH : sH;



	//alert(docwidth2+' 444 '+docheight2);

	showPopupiframe(docwidth2,docheight2);



	return false;



	}