function open_details(isbn){
	var alwaysOnTop;
	//alwaysOnTop=true;

	var url="img.php?isbn="+isbn;
	if(alwaysOnTop)
	{
		var wnd_params="status:no; resizable:no; dialogWidth:380px; dialogHeight:480px";
		window.showModelessDialog(url,"",wnd_params);
	}
	else
	{
		wnd_params="height=480px,width=380px,top=35,left=50,resizable=no,scrollbars=no,titlebar=no,hotkeys=no,menubar=no,status=no,alwaysRaised=yes";
		var popUp = window.open(url,"img_wnd",wnd_params);
		popUp.focus();
		var d=popUp.document;
	}
}
 
function open_wnd(img, img2, tit){
	var wnd_params="height=500,width=340,top=35,left=50,resizable=no,scrollbars=no,titlebar=no,hotkeys=no,menubar=no,status=no,alwaysRaised=yes";
	var popUp = window.open("tmp/img.php","img_wnd",wnd_params);
	popUp.focus();
	var d=popUp.document;
	var s="";

	s='<html><link rel="STYLESHEET" type="text/css" href="stylesheet.css">\n';
	s+='<script language="JavaScript" type="text/javascript" src="tmp/fnc.js"></script>\n';
	s+='<head><title>'+tit+'</title></head>\n';
	s+='<body><center>\n';
	
	s+='<img src="'+img+'" height="420">\n';
	s+='<br /><br />\n';
	s+='<table width=300><Tr>\n';
	s+='<td align="left" width="30"></td>\n';
	s+='<td align="center" width="240">\n';
	s+='<a href="javascript:window.close();" class="ampliar" style="font-size:16px;">CERRAR VENTANA</a>\n';
	s+='</td>\n';
	s+='<td align="right" width="30">\n';
	if(img2)
		s+='<a href="javascript:open_wnd(\''+img2+'\', 0, \''+tit+'\');" class="ampliar" style="font-size:16px;"> >> </a>\n';

	s+='</td>\n';
	s+='</Tr></table>\n';
	s+='</body></html>\n';
//	alert(s);	
	d.write(s);
}

function popUP_wnd(img, tit){
	var popUp = window.createPopup();
	tmp=popUp.document.body;
	tmp.innerHTML = '<img src="img/cat/'+img+'.jpg" width="300">';
	tmp.style.padding = "1px";
	popUp.show(100,100,300,400,document.body);
}

//////////////////////////////////////////////////////////////////////////////////////////
PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

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 optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
	
function popImage(imageURL,imageTitle)
{
if (isNN)
	imgWin=window.open('about:blank','',optNN);
if (isIE)
	imgWin=window.open('about:blank','',optIE);
	
with (imgWin.document)
{
	
	writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');
	writeln('<sc'+'ript>');
	writeln('var isNN,isIE;');
	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('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){');       
	writeln('window.innerWidth=document.images["George"].width;');
	writeln('window.innerHeight=document.images["George"].height;}}');
	writeln('function doTitle(){document.title="'+imageTitle+'";}');
	writeln('</sc'+'ript>');
	if (!AutoClose) 
		writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
	else 
		writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
	writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
	close();		
}
}

function rotate_banner()
{
var target_link = new Array();
var img_file_name = new Array();
var footer = new Array();
var ckname = 'mp_banner_pub';

var n=GetCookie(ckname);
var MAX_BANNERS = 10;
if(n==''||n==0||n=='NaN'||n>=MAX_BANNERS)
	n=1;
else
	n++;

target_link		[1]="http://www.buscasexo.com.mx/";
img_file_name	[1]='http://banners.buscarsexo.com/bsmx/banner1.gif';
footer				[1]='<FONT SIZE=2 FACE=Verdana, Arial, Helvetica>BuscaSexo México - Tu portal de SEXO en América Latina !</FONT>';

target_link		[2]="http://www.sexoafull.com/cgi-bin/rate.cgi?rate=1&ID=127798";
img_file_name	[2]='http://www.sexoafull.com/b1.gif" width="468" height="60"';
footer				[2]='';

target_link		[3]="http://www.sexo-busca.net/";
img_file_name	[3]='http://www.mundoporno.com.mx/img/banner_sexo_buscanet.gif';
footer				[3]='';

target_link		[4]="http://alegralavista.com/";
img_file_name	[4]='http://alegralavista.com/banners/banner-1.gif';
footer				[4]='&iexcl;&iexcl;El MEJOR buscador de Sexo de la Web!!';

target_link		[5]="http://www.listasexy.com/";
img_file_name	[5]='http://www.listasexy.com/banners/banner1.gif';
footer				[5]='';

target_link		[6]="http://www.sexplorador.com/";
img_file_name	[6]='http://www.mundoporno.com.mx/img/banner_sexplorador.gif';
footer				[6]='SEXplorador - Si buscas SEXO, no pierdas el tiempo';

target_link		[7]="http://www.busca-sexo.info/";
img_file_name	[7]='http://www.busca-sexo.info/banners/busca-sexo_02.gif';
footer				[7]='Si quieres encontrar las mejores paginas de sexo en espa&ntilde;ol, buscalas en BUSCA-SEXO';

target_link		[8]="http://www.mundoporno.com.mx/";
img_file_name	[8]='http://www.mundoporno.com.mx/img/banner5.gif';
footer				[8]='';

target_link		[9]="http://www.iberporno.com/";
img_file_name	[9]='http://www.arrakis.es/%7Emrmojo/ban4.gif';
footer				[9]='Porno Gratis y Videos de Sexo';

target_link		[10]="http://www.mundoporno.com.mx/";
img_file_name	[10]='http://www.mundoporno.com.mx/img/banner3.gif';
footer				[10]='';

var str='';
str+='<A HREF="'+target_link[n]+'" onMouseOver="parent.status=\''+target_link[n]+'\';return true">';
str+='<img src=\"'+img_file_name[n]+'\" name=\"banner\" border=\"0\"><br>'+footer[n]+'</a><br><br>';

n++
str+='<A HREF="'+target_link[n]+'" onMouseOver="parent.status=\''+target_link[n]+'\';return true" target="_blank">';
str+='<img src=\"'+img_file_name[n]+'\" name=\"banner\" border=\"0\"><br>'+footer[n]+'</a><br><br>';

document.write(str);

preSetCookie(ckname, n, 365);

}

var myback_color = "#f7f7f7";
var mywidth = 80;
var my12_hour = 1;
var dn = ""; 
var old = "";

function show_clock()
{
		//show clock in NS 4
		if (document.layers)
                document.ClockPosNS.visibility="show"
		if (old == "die") { return; }

		var Digital = new Date();
		var hours = Digital.getHours();
		var minutes = Digital.getMinutes();
		var seconds = Digital.getSeconds();

		if (my12_hour) {
			dn = "AM";
			if (hours > 12) { dn = "PM"; hours = hours - 12; }
			if (hours == 0) { hours = 12; }
		} else {
			dn = "";
		}
		if (minutes <= 9) { minutes = "0"+minutes; }
		if (seconds <= 9) { seconds = "0"+seconds; }

		myclock = '';
		myclock += '<div class="head_date">(';
		myclock += hours+':'+minutes+':'+seconds+' '+dn;
		myclock += ')</div>';

		if (old == "true") {
			document.write(myclock);
			old = "die"; return;
		}
		
		if (document.layers) {
			clockpos = document.ClockPosNS;
			liveclock = clockpos.document.LiveClockNS;
			liveclock.document.write(myclock);
			liveclock.document.close();
		} else if (document.all) {
			LiveClockIE.innerHTML = myclock;
		} else if (document.getElementById) {
			document.getElementById("LiveClockIE").innerHTML = myclock;
		}

		setTimeout("show_clock()",1000);
}

function rotar_imagen()
{
	id_gpo_publicidad.innerHTML = "<script>img_1.src=\"img/OVPUBLICIDAD-banner.gif\"</script>";
	setTimeout("rotar_imagen()",3000);
}

