﻿function preloadspic() {
//    var i = 0;
//    pic = new Image()

//    images = new Array();
//    images[0] = "../images/menu_bj_05.gif";
//    images[1] = "../images/menu_bj_05_over.gif";
//    images[2] = "../images/menu_left_bj.gif";
//     images[3] = "../images/menu - bj_left - over.gif.gif";
//       
//    for  (i=0; i<4; i++){
//    pic.src = images[i];
//}
for (i = 0; i < spnamesA.length - 1; i++) {
    pics = new Image();
    pics.src = "http://www.giloz.org.il/gallary/" + spnamesA[i];
}  
}
function preloadbpic() {

    for (i = 0; i < bpnamesA.length - 1; i++) {
        picb = new Image();
        picb.src = "http://www.giloz.org.il/gallary/" + bpnamesA[i];
    }
}         
function CallClockMenu() {
    var a = location.href;

    if (a == "http://www.giloz.org.il/") {
        var b = document.getElementById('order1');
        b.style.color = "#ffffff";
        
    }
    if (a == "http://www.giloz.org.il/pages/services.aspx") {
        var b = document.getElementById('order2');
        b.style.color = "#ffffff";

    }
    if (a == "http://www.giloz.org.il/pages/management.aspx") {
        var b = document.getElementById('order3');
        b.style.color = "#ffffff";
       
    }
    if (a == "http://www.giloz.org.il/pages/gallery.aspx") {
        var b = document.getElementById('galle');
        b.style.color = "#ffffff";
       
    }
    if (a == "http://www.giloz.org.il/pages/contact.aspx") {
        var b = document.getElementById('cont');
        b.style.color = "#ffffff";

    }
    if ((a != "http://www.giloz.org.il/") && (a != "http://www.giloz.org.il/pages/services.aspx") && (a != "http://www.giloz.org.il/pages/management.aspx") && (a != "http://www.giloz.org.il/pages/contact.aspx") && (a != "http://www.giloz.org.il/pages/gallery.aspx")) {
        var name = "cat";
        name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
        var regexS = "[\\?&]" + name + "=([^&#]*)";
        var regex = new RegExp(regexS);
        var results = regex.exec(window.location.href);
        if (results == null)  {
            var b = document.getElementById('info');
            b.style.color = "#ffffff";
        }
     }

         if (a != "http://www.giloz.org.il/"){
        var name = "cat";
        name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
        var regexS = "[\\?&]" + name + "=([^&#]*)";
        var regex = new RegExp(regexS);
        var results = regex.exec(window.location.href);
        if (results != null) {
        var b = document.getElementById('galle');
            b.style.color = "#ffffff";
         }
      }

    setInterval('Clock()', 1000);
}

function Clock() {
    var time = new Date();
    var a = document.getElementById("ww");
   if (navigator.appName =="Microsoft Internet Explorer") {
        a.innerText = time.toLocaleString();
    }
    else
        if (a.textContent) {
            a.textContent = time.toLocaleString();
        }
        
 }


 function BtnClick(a) {
   a.style.color = "red";
}



