/************************************************************************/
/* Javascript Functions                                                 */
/* ==================================================================== */
/* Copyright (c) 2003 by the_bard                                       */
/*                                                                      */
/* the_bardus@hotmail.com                                               */
/* http://thebard.homedns.org/                                          */
/*                                                                      */
/************************************************************************/

/////////////////////////////////////////////////////
// Modificar Tamaņo del SWF                        //
/////////////////////////////////////////////////////
function _SWFZoom(d) {
	obj = document.getElementById("FlashGame");
	if (_browser("msie")==false) {
		alert("Para modificar el tamaņo del juego se necesita el explorador de windows :(");
		return;
	}
	if (d==0) {
		nw = obj.width*0.9;
		nh = obj.height*0.9;
	} else {
		nw = obj.width*1.1;
		nh = obj.height*1.1;
	}
	obj.width = nw;
	obj.height = nh;
	_WResize(nw, nh);
}
// /*	/////////////////////////////////////	*/ //


/////////////////////////////////////////////////////
// Modificar Tamaņo de la Ventana                  //
/////////////////////////////////////////////////////
function _WResize(resw, resh) {
	resw = resw+330;
	resh = resh+387;
	if (resw>screen.width) {
		resw=screen.width-50;
	} else if(resw<640) {
		resw = 640;
	}
	if ((resh+60)>screen.height) resw=(screen.height-80);
	if (_browser("opera")) {
		resh = resh-29;
	} else if(_browser("mozilla/5.0")) {
		resw = resw;
		resh = resh-7;
	}
	self.resizeTo(resw,resh);
}
// /*	/////////////////////////////////////	*/ //

/////////////////////////////////////////////////////
// Aņadir Favorito                                 //
/////////////////////////////////////////////////////
function _AddFav(obj,base,id) {
	url = base+id+".html";
	w=400;
	h=120;
	window.open(url, "_blank", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width="+w+", height="+h);
}
// /*	/////////////////////////////////////	*/ //

function _click(e) {
	var v = "ooopppsss!!";
	if (document.all && event.button == 2) alert(v);
	else if (document.layers && e.which == 3) alert(v);
}
if (document.layers) document.captureEvents(Event.MOUSEDOWN);
else document.onmousedown=_click;
