var IE = false ;

if (/MSIE/.test(navigator.userAgent))
{
	IE = true;
}

function documentwrite(str)
{
  document.write(str);
}


function resizepopup(wid) 	
{
	if (IE) {
		var winW = wid, winH = 200;
		winW = wid;
		winH = document.body.scrollHeight;
		
		if(winH > 750)
		{
			winH = 750;
		}
    var windowX = Math.ceil( (window.screen.width  - wid) / 2 );
    var windowY = Math.ceil( (window.screen.height - winH) / 2 );
    window.moveTo(windowX, windowY);
		
		if(document.body.clientHeight)
		{
	    	window.resizeBy(winW - document.body.clientWidth, winH - document.body.clientHeight);
		}
		else
		{
	    	window.resizeBy(winW - window.innerWidth, winH - window.innerHeight);
	  }	
	} else {
		var width_adjustment = 6;
		var height_adjustment = 32;
		
		var oW = window.document.body;
		var oW = oW.clip ? oW.clip.width : oW.offsetWidth;

		var oH = window.document.body;
		var oH = oH.clip ? oH.clip.height : oH.offsetHeight;

		window.resizeTo( oW + 200, oH + 200 );

		var myW = 0, myH = 0, d = window.document.documentElement, b = window.document.body;
		if( window.innerWidth ) { 
			myW = window.innerWidth; myH = window.innerHeight; 
		} else if( d && d.clientWidth ) { 
			myW = d.clientWidth; myH = d.clientHeight; 
		} else if( b && b.clientWidth ) {
			myW = b.clientWidth; myH = b.clientHeight; 
		}
		
		if( window.opera && !document.childNodes ) { myW += 16; }
		window.resizeTo( parseInt(wid) + width_adjustment, oH + ( (oH + 200 ) - myH ) + height_adjustment);
	}
}