$(document).ready(function() {
	$('#pub01').flash(
	    { src: 'pub/IAPV.swf',
	      version: '7.0.65',
	      width: 250,
	      height: 187
	    }
	);
	google_ad_client = "pub-4587712982374277";
	/* 180x150, creado 2/03/09 */
	google_ad_slot = "2379316844";
	google_ad_width = 180;
	google_ad_height = 150;

	
});

function changeArchive(link) {
	var indice = link.selectedIndex;
	if(  (indice == 0) || (indice == 1) ) {
		link.selectedIndex = 0;
	}
	else
	{
		document.location = link.value;
	}
}

function popup(url,ancho,alto) {
  day = new Date();
  id = day.getTime();
  links = screen.width/2-(ancho/2);
  oben = screen.height/2-(alto/2);
  eval("page" + id + " = window.open(url, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=' + ancho + ',height=' + alto + ',left=' + links + ',top=' + oben);");
}

function verCommentForm()
{
    var ps = document.getElementById("commentBody").style;
    ps.display = "block";
    ps.visibility = "visible";
    document.getElementById("author").focus()
}


function rs(theObj, inOut)
{
	obj = findObj(theObj);
	what = document.getElementById(theObj);
	what.style.textDecoration = inOut? 'underline' : 'none'
	document.getElementById('epigrafe').innerHTML = what.innerHTML;
}

/*
function findObj(theObj, theDoc)
{
  var p, i, foundObj;

  if(!theDoc) theDoc = document;
  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  {
    theDoc = parent.frames[theObj.substring(p+1)].document;
    theObj = theObj.substring(0,p);
  }
  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  for (i=0; !foundObj && i < theDoc.forms.length; i++)
    foundObj = theDoc.forms[i][theObj];
  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++)
    foundObj = findObj(theObj,theDoc.layers[i].document);
  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);

  return foundObj;
}

var cookiePopup1 = readCookie("popup1");
var cookiePopup2 = readCookie("popup3");


function close_pub()
{

	var p = findObj("pub").style;
	p.visibility = "hidden";
	createCookie("close", true, 1);

}


if (! cookiePopup1 )
{
	popup('popups/pop1.htm', 610, 160);
	createCookie("popup1", true, 1);
}
else
{
	if (! cookiePopup2 )
	{
		popup('popups/pop3.htm', 610, 300);
		createCookie("popup3", true, 1);
	}
}
*/