function writeflash(o,m,w,h,p,oid) {
	if (oid!=null) {oid="id='"+oid+"'";}
	f="<object "+oid+" classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='"+w+"' height='"+h+"'>";
	f+="<param name='movie' value='"+m+"'>";
	f+="<param name='quality' value='high'>";
	if (p!="") {f+="<param name=flashvars value='"+p+"'>";}
	f+="<param name='wmode' value='transparent'>";
	f+="<embed "+oid+" src='"+m+"' width='"+w+"' height='"+h+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' wmode='transparent'";
	if (p!="") {f+=" flashvars='"+p+"'";}
	f+="></embed>";
	f+="</object>";
	document.getElementById(o).innerHTML=f
}

function bookmark(){
    var title="Empanadas La Barca"
    var url="http://www.empanadaslabarca.com/"

    if (window.sidebar) window.sidebar.addPanel(title, url,"");

    else if( window.opera && window.print )
    {
    var mbm = document.createElement('a');
    mbm.setAttribute('rel','sidebar');
    mbm.setAttribute('href',url);
    mbm.setAttribute('title',title);
    mbm.click();
    }

    else if( document.all ) window.external.AddFavorite( url, title);

}

function abrirVentana(url, width, height, name) {
	if (name==null) {name='nueva_ventana';}
	var str = "height=" + height + ",innerHeight=" + height;
	str += ",width=" + width + ",innerWidth=" + width;
	if (window.screen) {
		var ah = screen.availHeight - 30;
		var aw = screen.availWidth - 10;
		var xc = (aw - width) / 2;
		var yc = (ah - height) / 2;
		str += ",left=" + xc + ",screenX=" + xc;
		str += ",top=" + yc + ",screenY=" + yc;
	}

	str += ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no";

	objwin=window.open(url, name, str);
	objwin.focus();
}

function toogle(idtoogle,valor) {
var cell = document.getElementById(valor);
if (idtoogle.checked)
{
document.getElementById('info'+valor).style.visibility = 'visible';
cell.className = "on";
}
else
{
document.getElementById('info'+valor).style.visibility = 'hidden';
document.getElementById(valor+'c1').value = '';
document.getElementById(valor+'c2').value = '';
document.getElementById(valor+'c3').value = '';
cell.className = "";
}
}

function cambiar(selcombo) {
if (selcombo.value=='2')
document.getElementById('nuevadir').style.visibility = 'visible';
if (selcombo.value=='1')
document.getElementById('nuevadir').style.visibility = 'hidden';
}

function openFullWindow(url,name) {
	var w = screen.width;
	var h = screen.height;
	leftPosition = 0;
	topPosition = 0;
	if (h<645) {
		var windowprops = 'width=' + w + ',height=' + h + ',top='+ topPosition +',left='+ leftPosition +',toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=yes'; //set popup window properties
	} else {
		var windowprops = 'width=' + w + ',height=' + h + ',top='+ topPosition +',left='+ leftPosition +',toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=yes'; //set popup window properties
	}
	if (name==null) name='remote';
	var popup = window.open(url,name,windowprops);
	//popup.moveTo(0,0)
	popup.resizeTo(screen.width,screen.height);
}