function readyInnerPopup( name )
{
	var left = 1;
	var top = 1;
	var width = 1;
	var height = 1;
	var url = 'about:blank';
	document.write( '<div id="' + name + '" style="display: none; position: absolute; left: '+left+'px; top: '+top+'px; width: '+width+'px; height: '+height+'px; background: white; z-index: 400; border: 1px solid #D9D9D9;"><iframe id="iframe' + name + '" src="' + url + '" marginheight="0" marginwidth="0" height="' + height + '" frameborder="0" scrolling="Yes" style="padding: 0px; width: 100%;"></iframe></div>' );
}
function hidePop( name )
{
	document.getElementById( name ).style.display = 'none';
}
function innerPop( name, url, width, height )
{
	browserWidth = getWidth();
	browserHeight = getHeight();
	var left = ( browserWidth - width ) / 2;
	var top = ( browserHeight - height ) / 2;
	document.getElementById( 'iframe' + name ).src = url;
	document.getElementById( name ).style.left = left;
	document.getElementById( name ).style.top = top;
	document.getElementById( name ).style.width = width;
	document.getElementById( name ).style.height = height;
	document.getElementById( 'iframe' + name ).style.height = height;
	document.getElementById( name ).style.display = 'block';
}
function innerPopup( name, url, width, height )
{
	browserWidth = getWidth();
	browserHeight = getHeight();
	var left = ( browserWidth - width ) / 2;
	var top = ( browserHeight - height ) / 2;
	document.write( '<div id="' + name + '" style="position: absolute; left: '+left+'px; top: '+top+'px; width: '+width+'px; height: '+height+'px; background: white; z-index: 400; border: 1px solid #D9D9D9;"><iframe src="' + url + '" marginheight="0" marginwidth="0" height="' + height + '" frameborder="0" scrolling="Yes" style="padding: 0px; width: 100%;"></iframe></div>' );
}
function getHeight()
{
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if( document.documentElement &&( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	return myHeight;
}
function getWidth()
{
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if( document.documentElement &&( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	return myWidth;
}
