var homepage = "http://www.disfrutaviajando.com";
var g_fIsSP2 = false;
function browserVersionSP2() { 
	g_fIsSP2 = (window.navigator.userAgent.indexOf("SV1") != -1); 
	if (g_fIsSP2) return true
	else return false;
}
function SetHomePage() {
	var page = window.document.body;
    page.style.behavior='url(#default#homepage)';
    page.setHomePage(homepage);
}
function SetFavorites() {
	SetBookmark(homepage,window.top.document.title);
}
function SetBookmark(url,title) {
    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 writeTo(suffix, prefix) {
  location.href = "mai" + "lto:" + prefix + "@" + suffix;
}
function overTD(td){
	td.style.cursor = 'pointer';
	td.firstChild.style.textDecoration = 'underline';
	window.status = td.firstChild.innerText;
}
function outTD(td){
	td.style.cursor = 'default';
	td.firstChild.style.textDecoration = 'none';
	window.status = '';
}
function mouseOver(src,clrOver,msg) {
	if (!src.contains(event.fromElement)) {
		src.style.cursor = 'pointer';
		src.bgColor = clrOver;
		window.status = msg;
	}
}
function mouseOut(src,clrIn) {
	if (!src.contains(event.toElement)) {
		src.style.cursor = 'default';
		src.bgColor = clrIn;
		window.status = '';
	}
}
function ShowModal(URL) {
	//var Args = new Array();
	//Args[0] = URL;
	//window.showModelessDialog('Modal/ModalPage.html',Args,'dialogWidth:800px;dialogHeight:600px;center:yes;help:no;status=yes;resizable:yes;');
	window.open('Modal/ModalPage.html?Page='+URL+'&x=1',null,'width=800px,height=600px,center=yes,help=no,status=yes,resizable=yes,');
}
function OpenWin(URL) {
	//window.open(URL,"_blank","status=yes,scrollbars=yes,toolbar=no,menubar=yes,location=no,resizable=yes");	
	window.open(URL,"_blank","");
}
function OpenReservationWin(page,basePath) {
	if (basePath == undefined) basePath = '';
	var URL = basePath+'ReservationTemplate.aspx?url='+page;
	window.open(URL,"_blank","width=800px,height=530px,status=yes,scrollbars=no,toolbar=yes,menubar=yes,location=no,resizable=no");	
}
function ShowContent(URL,basePath) {
	if (basePath == undefined) basePath = '';
	top.document.location.href = basePath+'MainTemplate.aspx?url='+URL;
}
function ShowContentInfo(basePath) {
	//ShowContent("http://www.zafirotours.es/agencias/web/formulario.php3?EMAIL=gramanet@zafirotours.es&NOMBREAGENCIA=SANTA%20COLOMA%20DE%20GRAMANET%20(BARCELONA)",basePath);
	//ShowContent("http://gramanet.zafirotours.es/formulario.php3?EMAIL=gramanet@zafirotours.es&NOMBREAGENCIA=SANTA%20COLOMA%20DE%20GRAMANET%20(BARCELONA)",basePath);
	OpenWin("http://lunasdemiel.edeniatravel.com/?URL=PRESUPUESTO");
}	
function ReDimIframe(OIframe) {
	try {
		OIframe.scrolling = "no";
		OIframe.height = window.frames[OIframe.id].document.body.scrollHeight + 10;	
		window.frames[OIframe.id].document.body.oncontextmenu=click;		
		window.frames[OIframe.id].document.bgColor = window.frames[OIframe.id].parent.document.bgColor;	
	} catch (e) {
		OIframe.scrolling = "auto";
		OIframe.document.bgColor = window.frames[OIframe.id].parent.document.bgColor;		
	}
}
/*
document.onmousedown = OnClick;
function OnClick(e) {
	if (event.button == 2) {
		alert(top.document.title);
		return false;
	}
}
*/
window.onload = Onload;
window.onresize = OnResize;
function Onload() {
	try {doTrans(0);} catch(e){}
	top.document.body.oncontextmenu=click;
}
function OnResize() {
	try {
		var OIframe = window.top.document.getElementById('IFContentPage');
		if (OIframe != null) {
			if (window.frames[OIframe.id]!=null) {
				if (document.body.clientHeight > window.frames[OIframe.id].document.body.scrollHeight)
					OIframe.height = '100%'	
				else
					OIframe.height = window.frames[OIframe.id].document.body.scrollHeight;	
			}
		}
	} catch (e) {
		OIframe.scrolling = "auto";
		OIframe.document.bgColor = window.frames[OIframe.id].parent.document.bgColor;		
	}	
}
function click(e) {return false;}

