PositionX = 100;
PositionY = 100;
defaultWidth  = 500;
defaultHeight = 500;
var AutoClose = true;

if (parseInt(navigator.appVersion.charAt(0))>=4){
	var isNN=(navigator.appName=="Netscape")?1:0;
	var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;
	var isOP=(navigator.appName.indexOf("Opera")!=-1)?1:0;
}
var optNN='scrollbars=yes,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=yes,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optOP='scrollbars=yes,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;

function img_big(imageURL,imageTitle){
	var imgWin;
	if (isNN){imgWin=window.open('about:blank','',optNN);}
	if (isIE){imgWin=window.open('about:blank','',optIE);}
	if (isOP){imgWin=window.open('about:blank','',optOP);}
	with (imgWin.document){
	writeln('<html><head><title>'+imageTitle+'</title><style>body{margin:0px;}</style>');
	writeln('<sc'+'ript>');
	writeln('var isNN,isIE,isOP;');
	writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
	writeln('isNN=(navigator.appName=="Netscape")?1:0;');
	writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;');
	writeln('isOP=(navigator.appName.indexOf("Opera")!=-1)?1:0;}');
	writeln('function reSizeToImage(){');
	writeln('if (isIE){');
	writeln('window.resizeTo(100,100);');
	writeln('width=100-(document.body.clientWidth-document.images[0].width);');
	writeln('height=100-(document.body.clientHeight-document.images[0].height);');
	writeln('window.resizeTo(width,height);}');
	writeln('if (isNN || isOP){');
	writeln('imgt = document.getElementById("pRofile"); window.innerWidth=imgt.width;');
	writeln('window.innerHeight=imgt.height;}}');
	writeln('</script>');
	writeln('</head><body bgcolor=ffffff scroll="no" onload="reSizeToImage();self.focus()">')
	writeln('<div id="Layer1" style="position:absolute; width:100%; height:100%; z-index:1">');
	writeln('<img name="pRofile" id="pRofile" src='+imageURL+' style="display:block"></div></body></html>');
	close();
	}
}


function om(pu){
        var width = 530;
        var height = 400;
        var w = screen.width;
        var l = ( screen.width - width )/2;
        var t = ( screen.height - height )/2 - 20;
        window.open( pu, "FriendPopup", "toolbar=0, scrollbars=0, resizable=0, left="+l+", top="+t+", width="+width+", height="+height );
}

function pp(pu, width, height){
        var w = screen.width;
        var l = ( screen.width - width )/2;
        var t = ( screen.height - height )/2 - 20;
        window.open( pu, "PP", "toolbar=0, scrollbars=1, resizable=1, left="+l+", top="+t+", width="+width+", height="+height );
}
