// JavaScript Document
//
// Function list and description
// function openInter(type)     Open layer on Mouseover with language menu
//
// my Msg används i funktion scrollMsg()
// function Mail(box)           Function to hide email adress for address sniffers
// function Posta(box, domain)  Similar as Mail() 
// function formHandler1(form1) Handle language list scroll menu (to be pensioned)
// function printSimple()       Print function (not used)
// function apriimmagine(foto,larghezza,altezza) Show photo in small window
// function showphoto(photo)	Show photo in small window
// function chkframe()          Check that the fram is the main frame (not used)

myMsg = "Hotel Carasco, Porto delle Genti, 98055 Lipari, Italy - Tel +39-0909811605 - Fax +39-0909811828 - info @ carasco.com                            "

i=0
function scrollMsg() {
frontPart = myMsg.substring(i,myMsg.length)
backPart = myMsg.substring(0,i)
window.status = frontPart + backPart
if (i < myMsg.length) {
i++
}
else {
i = 0
}
setTimeout("scrollMsg()",150)
}

function Posta(box, domain) {
   document.write("<a href=\"mailto:"+box+"@"+domain+"\" class=\"smalllinkgold\">"+box+"@"+domain+"</a>"); }

function formHandler1(form1){
var URL = document.form1.site1.options[document.form1.site1.selectedIndex].value;
window.top.location.href = URL;
}

function printSimple() {
    if (window.print) {
        window.print();
    }
    else {
    alert('Högerklicka...');
    }
}

function apriimmagine(foto,larghezza,altezza)  {
	var MyWidth = (window.screen.width-580)/2 - 10;
	var MyHeight = (window.screen.height-406)/2 - 40;
	w1=window.open("", "crs1", "width=" + larghezza + ",height=" + altezza + ",left=" + MyWidth + ",top=" + MyHeight + ",scrollbars=no,status=no,resizable=no");
    w1.document.writeln("<html><head><title>-- HOTEL CARASCO --</title></head>");
    w1.document.writeln("<body bgcolor='#FFFFFF' text='#000000' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>");
    w1.document.writeln("<a href='' onclick='window.close()'><img src='http://www.carasco.com/photos/"+ foto + "' border='0' alt='Click to close the Window...'></a>");
    w1.document.writeln("</body></html>");
    w1.document.close();
    w1.focus();
}

function showphoto(photo)  {
	var MyWidth = (window.screen.width-580)/2 - 10;
	var MyHeight = (window.screen.height-406)/2 - 40;
	w1=window.open("", "crs1", "width=580,height=406,left=" + MyWidth + ",top=" + MyHeight + ",scrollbars=no,status=0,resizable=no");
    w1.document.writeln("<html><head><title>-- HOTEL CARASCO --</title></head>");
    w1.document.writeln("<body bgcolor='#FFFFFF' text='#000000' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>");
    w1.document.writeln("<a href='' onclick='window.close()'><img src='http://www.carasco.com/photos/"+ photo + ".jpg' border='0' alt='Click to close the window...'></a>");
    w1.document.writeln("</body></html>");
    w1.document.close();
    w1.focus();
}

function chkframe() {
    if (parent.location.href == self.location.href) {
    window.location.href = 'http:\/\/www.carasco.com';
    }
}

function OpenWindow(path,larghezza,altezza) {
	window.open(path, "Contact", "width=" + larghezza + ",height=" + altezza + "titlebar=1,hotkeys=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=1");
}

function display_description(which, mode)
    {
      if (mode=='show')
      {
        document.getElementById(which).style.display = 'block';
      }
      else
      {
        document.getElementById(which).style.display = 'none';
      }
    }