﻿// JScript File

   
    
   
    
    
    
    /*<![CDATA[*/
    
           
            
            
var Message="Welcome to Ibiza Hotels";
var place=1;
scrollIn();
function scrollIn() 
{
	window.status=Message.substring(0, place);
	if (place >= Message.length) 
	{
		place=1;
		window.setTimeout("scrollOut()",300); 
	} 
	else
	{
		place++;
		window.setTimeout("scrollIn()",100); 
   } 
}
function scrollOut() 
{
	window.status=Message.substring(place, Message.length);
	if (place >= Message.length) 
	{
		place=1;
		window.setTimeout("scrollIn()", 100);
	} 
	else
	{
		place++;
		window.setTimeout("scrollOut()", 100);   
	}
}

   
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
  
try {
var pageTracker = _gat._getTracker("UA-634298-24");
pageTracker._trackPageview();
} catch(err) {}
<!--
function __RP_Callback_Helper(str, strCallbackEvent, splitSize, func){var event = null;if (strCallbackEvent){event = document.createEvent('Events');event.initEvent(strCallbackEvent, true, true);}if (str && str.length > 0){var splitList = str.split('|');var strCompare = str;if (splitList.length == splitSize)strCompare = splitList[splitSize-1];var pluginList = document.plugins;for (var count = 0; count < pluginList.length; count++){var sSrc = '';if (pluginList[count] && pluginList[count].src)sSrc = pluginList[count].src;if (strCompare.length >= sSrc.length){if (strCompare.indexOf(sSrc) != -1){func(str, count, pluginList, splitList);break;}}}}if (strCallbackEvent)document.body.dispatchEvent(event);}function __RP_Coord_Callback(str){var func = function(str, index, pluginList, splitList){pluginList[index].__RP_Coord_Callback = str;pluginList[index].__RP_Coord_Callback_Left = splitList[0];pluginList[index].__RP_Coord_Callback_Top = splitList[1];pluginList[index].__RP_Coord_Callback_Right = splitList[2];pluginList[index].__RP_Coord_Callback_Bottom = splitList[3];};__RP_Callback_Helper(str, 'rp-js-coord-callback', 5, func);}function __RP_Url_Callback(str){var func = function(str, index, pluginList, splitList){pluginList[index].__RP_Url_Callback = str;pluginList[index].__RP_Url_Callback_Vid = splitList[0];pluginList[index].__RP_Url_Callback_Parent = splitList[1];};__RP_Callback_Helper(str, 'rp-js-url-callback', 3, func);}function __RP_TotalBytes_Callback(str){var func = function(str, index, pluginList, splitList){pluginList[index].__RP_TotalBytes_Callback = str;pluginList[index].__RP_TotalBytes_Callback_Bytes = splitList[0];};__RP_Callback_Helper(str, null, 2, func);}function __RP_Connection_Callback(str){var func = function(str, index, pluginList, splitList){pluginList[index].__RP_Connection_Callback = str;pluginList[index].__RP_Connection_Callback_Url = splitList[0];};__RP_Callback_Helper(str, null, 2, func);}
//-->

           

    function go()
    {
           var f=0;
           if(document.getElementById("ctl00_Text1").value=="")
            {
                document.getElementById("ctl00_Text1").style.backgroundColor="#ffc0cb" ;
                document.getElementById("ctl00_Text1").focus();
                f=1;
            }
            else  
            {  
                 document.getElementById("ctl00_Text1").style.backgroundColor="#ffffff" ;
                 alert("In process.........");
            }
            
             if(f==1)
                 return false;
           else
                return true;
    }

       
       
       function All(val)
       {
            if(val=="All")
                document.getElementById("ctl00_ddlStar").value="All";
       }
     function do_totals()
     { 
        document.getElementById("pleasewaitScreen").style.visibility="visible";
     }
    function check111()
    { 
         var f=0;
         if(document.getElementById("ctl00_txtName").value=="")
            {
                document.getElementById("ctl00_txtName").style.backgroundColor="#ffc0cb" ;
                document.getElementById("ctl00_txtName").focus();
                f=1;
            }
            else    
                 document.getElementById("ctl00_txtName").style.backgroundColor="#ffffff" ;
           
           
            if(document.getElementById("ctl00_txtEmail").value=="")
            {
                document.getElementById("ctl00_txtEmail").style.backgroundColor="#ffc0cb" ;
                document.getElementById("ctl00_txtEmail").focus();
                f=1;
            }
            else    
                 document.getElementById("ctl00_txtEmail").style.backgroundColor="#ffffff" ;
            
             if(f==1)
                 return false;
           else
                return true;
    }
    
    function chkQuick()
    {
         var f=0; 
          if(document.getElementById("ctl00_txtStartM").value!="")
          {        
                if(document.getElementById("ctl00_txtEndM").value=="")
                {
                    document.getElementById("ctl00_txtEndM").style.backgroundColor="#ffc0cb" ;
                   f=1;
                }
                else    
                      document.getElementById("ctl00_txtEndM").style.backgroundColor="#ffffff" ;
                //.Date Comparision...................
                 Date.prototype.toDDMMYYYYString = function () {return isNaN (this) ? 'NaN' : [this.getDate() > 9 ? this.getDate() : '0' + this.getDate(), this.getMonth() > 8 ? this.getMonth() + 1 : '0' + (this.getMonth() + 1), this.getFullYear()].join('/')}
                 Date.fromDDMMYYYY = function (s) {return (/^(\d\d?)\D(\d\d?)\D(\d{4})$/).test(s) ? new Date(RegExp.$3, RegExp.$2 - 1, RegExp.$1) : new Date (s)}
                 var s=Date.fromDDMMYYYY(document.getElementById("ctl00_txtStartM").value);             
                 var e=Date.fromDDMMYYYY(document.getElementById("ctl00_txtEndM").value);           
               if(s>=e)
               {
                   document.getElementById("ctl00_txtEndM").style.backgroundColor="#ffc0cb" ;
                   f=1;
               }     
               var dat=today=new Date();          
               var today=(dat.getDate()-1)+'/'+(dat.getMonth()+1)+'/'+dat.getFullYear();    
    //           alert(dat);   
    //            alert(s);   
                dat=Date.fromDDMMYYYY((dat.getDate())+'/'+(dat.getMonth()+1)+'/'+dat.getFullYear());   
               if(s<=dat)
                {
                   alert('Booking not allowed in back date');
                   document.getElementById("ctl00_txtStartM").style.backgroundColor="#ffc0cb" ;
                    f=1; 
                }
                else    
                     document.getElementById("ctl00_txtStartM").style.backgroundColor="#ffffff" ;           
            }
            if(f==1){             
                 return false;
                 }
           else
                return true;  
    }
    function addBookmark(title,url) {
			if (window.sidebar) {
				window.sidebar.addPanel(title, url,"");
			} else if( document.all ) {
				window.external.AddFavorite( url, title);
			}
		}

    
    function HotelM()
    {        
         if(document.getElementById("ctl00_txtHotelM").value=="")
            {
               // document.getElementById("ctl00_txtHotelM").style.backgroundColor="#ffc0cb" ;
                document.getElementById("ctl00_txtHotelM").focus();
                 return false;       
            }
//            else    
//                 document.getElementById("ctl00_txtHotelM").style.backgroundColor="#ffffff" ;
    }
    
    
    function login()
    {
         document.getElementById("tbllogin").style.display="block";
           document.getElementById("ctl00_txtID").focus();
    }
      function checkForInvalid(obj) {var ValidChars = "0123456789";
           var IsNumber=true;
           var Char;        
           for (i = 0; i < obj.value.length && IsNumber == true; i++) 
           { 
              Char = obj.value.charAt(i);              
              if (ValidChars.indexOf(Char) == -1) 
              {
                alert("Invalid character.")
                obj.focus();
                obj.select();
               return  IsNumber = false;
              }
           }
           return IsNumber;
            }
            
            
            
            
    function loginchk()
    {
        var f=0;
         if(document.getElementById("ctl00_txtpwd").value=="")
            {
                document.getElementById("ctl00_txtpwd").style.backgroundColor="#ffc0cb" ;
                document.getElementById("ctl00_txtpwd").focus();
                f=1;
            }
            else    
                 document.getElementById("ctl00_txtpwd").style.backgroundColor="#ffffff" ;   
            if(document.getElementById("ctl00_txtID").value=="")
            {
                document.getElementById("ctl00_txtID").style.backgroundColor="#ffc0cb" ;
                document.getElementById("ctl00_txtID").focus();
                f=1;
            }
            else    
                 document.getElementById("ctl00_txtID").style.backgroundColor="#ffffff" ;           
             if(f==1)
                 return false;
           else
                return true;
    }
    
    /*]]>*/

      
