﻿// JScript File
 var BaseUrl= "http://www.issta.co.il/";
 var ref= "guy_tal";

  var _browserCode = BrowserCode();
    var tmpDate = new Date()
    var maxAvailableDays = 320; 
    var CalS = parseInt(tmpDate.getMonth() + 1).toString() + "/" + tmpDate.getDate() + "/" + tmpDate.getFullYear(); // '12/25/2006'; 
    tmpDate = new Date(tmpDate.setDate(maxAvailableDays))
    var CalE = parseInt(tmpDate.getMonth() + 1).toString() + "/" + tmpDate.getDate() + "/" + tmpDate.getFullYear(); // '01/16/2007';
    
 function BrowserCode(){
        if ( (navigator.userAgent.indexOf("IE")!=-1) && (navigator.appName=="Microsoft Internet Explorer") ){
            return "IE";
        }
        else {
            return "FF";
        }
    }
    
 
    function getCurrDate(plusD,plusM,plusY)
{
 var currentTime = new Date()
 currentTime.setDate(currentTime.getDate() + plusD)
 currentTime.setMonth(currentTime.getMonth() + plusM)
 currentTime.setYear(currentTime.getFullYear() + plusY)
 
 var day = currentTime.getDate()
 var month = currentTime.getMonth() + 1
 var year = currentTime.getFullYear()

 return day + "/" + month + "/" + year

}

 
 function OpenCalendar(obj){
		SC(document.getElementById(obj));
	}

    // fill up the second Select box after prime has changed
    function FilterArray(__citycode)
    {
       removeAllOptions(slct)
       slct.disabled = true;
       for(var i=0;i<citycode.length;i++)
       {
          try
          {
            if(citycode[i] == __citycode || citycode[i] == "")
            {
                addOption(slct,name[i],code[i]);
            }
          }
          catch(err){}
        }
        
        slct.disabled = false;

    }
   

    function addOption(selectbox,text,value )
    {
        var optn = document.createElement("OPTION");
        optn.text = text;
        optn.value = value;
		if(value=='NYC')
			optn.selected=true;
		selectbox.options.add(optn);
    }

    function removeAllOptions(selectbox)
    {
        var i;
        for(i=selectbox.options.length-1;i>=0;i--)
        {
        selectbox.remove(i);
        }
    }

  




