//Popup window: 
function popup(name,width,height)
		{
			var popup = window.open("","Images","width=" + width + "height=" + height+ + ",toolbar=0, statusbar=0, menubar=0, resizable=0, scrollbars=no, directories=0, dependent=yes");
			popup.resizeTo((width)+10,(height)+28);
			popup.document.open();
			popup.document.write("<html><title>Battibatti.com</title><body bgcolor='#FFFFFF' bottommargin=0 rightmargin=0 leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><table width='100%' height='100%' border=0 cellspacing=0 cellpadding=0><tr><td align='center' valign='middle'><a href='javascript:self.close();'><img src='" + name + " 'border=0 alt='Click anywhere to close.'></a></td></tr></table></body></html>");
			popup.document.close();
			popup.moveTo((screen.width-width)/2, (screen.height-height)/2); 
			popup.focus()
		}

//Load page in popup window
function loadWindow(file,width,height) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(file, '" + id + "', 'width=" + width + ",height=" + height + ",toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0');");
}

//Load page with pic + caption
function showPic( imgName, imgCaption, imgWidth, imgHeight, textColor, bgColor ) {
	if(textColor=="")textColor="#919191"
	if(bgColor=="")bgColor="#000000"
	if(imgWidth<=100)imgWidth=100
	if(imgHeight<=100)imgHeight=100
	winHeight=imgHeight+220;
	w = window.open('','Demo','toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=yes,copyhistory=no,width='+imgWidth+',height='+winHeight);
	w.document.write( "<html><head><title>Battibatti.com</title>" );
	w.document.write( "<STYLE TYPE='text/css'>" );
	w.document.write( ".BODY A {font-family: verdana; font-size: 9px; color: #ffffff; text-decoration : none;}" );
	w.document.write( ".BODY A:Visited {font-family: verdana;font-size: 10px; color: #cccccc; }" );
	w.document.write( ".BODY A:Active { font-family: verdana; font-size: 10px; color: #cccccc; }" );
	w.document.write( ".BODY A:Hover { font-family: verdana; font-size: 10px; color: #cccccc; }" );
	w.document.write( "IMG {border-color : "+textColor+";}" );
	w.document.write( ".BODY {font-family: verdana; font-size : 10px; font-weight: normal; color : "+textColor+"; background-color : "+bgColor+"; }" );
	w.document.write( "</STYLE>" );
	w.document.write( "<script language='JavaScript'>\n");
	w.document.write( "IE5=NN4=NN6=false\n");
	w.document.write( "if(document.all)IE5=true\n");
	w.document.write( "else if(document.layers)NN4=true\n");
	w.document.write( "else if(document.getElementById)NN6=true\n");
	w.document.write( "function autoSize() {\n");
	w.document.write( "	if(IE5) self.resizeTo(document.images[0].width+35,document.images[0].height+120)\n");
	w.document.write( "	else if(NN6) self.sizeToContent()\n");
	w.document.write( "	else top.window.resizeTo(document.images[0].width,document.images[0].height+120)\n");
	w.document.write( "	self.focus()\n");
	w.document.write( "}\n");
	w.document.write( "</script>\n");
	w.document.write( "</head><body bgcolor='#000000' leftmargin=10 topmargin=10 marginwidth=10 marginheight=10 onLoad=" );
	w.document.write( "'javascript:autoSize();'>" );
	w.document.write( "<table cellpadding=0 cellspacing=0 border=0 class='body' width='100%'><tr><td colspan=4><img src='"+imgName+"' border=0 alt='Copyright battibatti.com'></td></tr>" );
	w.document.write( "<tr><td colspan='3' bgcolor='#000000'><img src='http://www.scaremongering.net/spacer.gif' border=0 height='2' width='1'></td></tr>" );
	w.document.write( "<tr><td align='left' class='body' style='padding-left:5px;padding-top:5px;'>" +imgCaption+ "</td>" );
	w.document.write( "<td align='center'>&nbsp;</td>" );
	w.document.write( "<td align='right' valign='top'><a href='javascript:top.window.close();'><nobr><img src='http://www.battibatti.com/close.gif' alt='Close Window' border='0' height='35' width='89'></a></nobr></td>" );
	w.document.write( "<td align='center'>&nbsp;</td></tr>" );
	w.document.write( "</table></body></html>" );
	w.document.close();
}


