﻿function preloadImages(){
myImg1 = new Image()
myImg1.src = "images/UL/countries/works/c_01.jpg"

myImg2 = new Image()
myImg2.src = "images/UL/countries/works/c_02.jpg"

myImg3 = new Image()
myImg3.src = "images/UL/countries/works/c_03.jpg"

myImg4 = new Image()
myImg4.src = "images/UL/countries/works/c_04.jpg"

myImg5 = new Image()
myImg5.src = "images/UL/countries/works/c_05.jpg"

myImg6 = new Image()
myImg6.src = "images/UL/countries/works/c_06.jpg"

myImg7 = new Image()
myImg7.src = "images/UL/countries/works/c_07.jpg"

myImg8 = new Image()
myImg8.src = "images/UL/countries/works/c_08.jpg"

myImg9 = new Image()
myImg9.src = "images/UL/countries/works/c_09.jpg"

myImg10 = new Image()
myImg10.src = "images/UL/countries/works/c_10.jpg"

myImg11 = new Image()
myImg11.src = "images/UL/countries/works/c_11.jpg"

myImg12 = new Image()
myImg12.src = "images/UL/countries/works/c_12.jpg"

myImg13 = new Image()
myImg13.src = "images/UL/countries/works/c_13.jpg"

myImg14 = new Image()
myImg14.src = "images/UL/countries/works/c_14.jpg"

myImg15 = new Image()
myImg15.src = "images/UL/countries/works/c_15.jpg"

myImg16 = new Image()
myImg16.src = "images/UL/countries/works/c_16.jpg"

myImg17 = new Image()
myImg17.src = "images/UL/countries/works/c_17.jpg"

myImg18 = new Image()
myImg18.src = "images/UL/countries/works/c_18.jpg"

myImg19 = new Image()
myImg19.src = "images/UL/countries/works/c_19.jpg"

myImg20 = new Image()
myImg20.src = "images/UL/countries/works/c_20.jpg"

myImg21 = new Image()
myImg21.src = "images/UL/countries/works/c_21.jpg"

myImg22 = new Image()
myImg22.src = "images/UL/countries/works/c_22.jpg"

myImg23 = new Image()
myImg23.src = "images/UL/countries/works/c_23.jpg"

}


function placeSWF(swfName, myWidth, myHeight, myTrans){
var mySWF = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+ myWidth +'" height="'+ myHeight +'"><param name="movie" value="' + swfName + '"><param name="quality" value="high"><param name="wmode" value="'+ myTrans +'"><embed src="' + swfName + '"width="'+ myWidth +'" height="'+ myHeight +'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="'+ myTrans +'"></embed></object>'
document.write(mySWF)
}




//------------------------------------------------------
function showHide(myState, myLayer){
if(myState=="show"){
document.getElementById(myLayer).style.visibility = "visible"
}
if(myState=="hide"){
document.getElementById(myLayer).style.visibility = "hidden"
//window.setTimeout("delayedHide('" + myLayer + "')", 1000)
}
}
//------------------------------------------------------
function checkFormAdmin(){
document.getElementById("username").style.backgroundColor = "#FFFFFF"
document.getElementById("password").style.backgroundColor = "#FFFFFF"

if(document.getElementById("username").value == ""){
document.getElementById("username").style.backgroundColor = "#FFC500"
alert("שם משתמש אינו יכול להיות ריק")
document.getElementById("username").focus()
return false
}
if(document.getElementById("password").value == ""){
document.getElementById("password").style.backgroundColor = "#FFC500"
alert("נא הקלד סיסמה")
document.getElementById("password").focus()
return false
}

}

function checkForm(){
document.getElementById("first_name").style.backgroundColor = "#E6E6E6"
document.getElementById("last_name").style.backgroundColor = "#E6E6E6"
document.getElementById("phone").style.backgroundColor = "#E6E6E6"

if(document.getElementById("first_name").value == ""){
document.getElementById("first_name").style.backgroundColor = "#D3FF91"
alert("PLEASE ENTER YOUR FIRST NAME")
document.getElementById("first_name").focus()
return false
}
if(document.getElementById("last_name").value == ""){
document.getElementById("last_name").style.backgroundColor = "#D3FF91"
alert("PLEASE ENTER YOUR LAST NAME")
document.getElementById("last_name").focus()
return false
}
if(document.getElementById("phone").value == ""){
document.getElementById("phone").style.backgroundColor = "#D3FF91"
alert("PLEASE ENTER YOUR PHONE NUMBER")
document.getElementById("phone").focus()
return false
}
}

function checkFormMuseums(){
document.getElementById("organization_name").style.backgroundColor = "#E6E6E6"
document.getElementById("phone").style.backgroundColor = "#E6E6E6"

if(document.getElementById("organization_name").value == ""){
document.getElementById("organization_name").style.backgroundColor = "#D3FF91"
alert("PLEASE ENTER THE ORGANIZATION NAME")
document.getElementById("organization_name").focus()
return false
}

if(document.getElementById("contact_person").value == ""){
document.getElementById("contact_person").style.backgroundColor = "#D3FF91"
alert("PLEASE ENTER CONTACT PERSON'S NAME")
document.getElementById("contact_person").focus()
return false
}

if(document.getElementById("phone").value == ""){
document.getElementById("phone").style.backgroundColor = "#D3FF91"
alert("PLEASE ENTER YOUR PHONE NUMBER")
document.getElementById("phone").focus()
return false
}
return true
}

function showHideMsg(c, i){
if(document.getElementById(c).style.display == "inline"){
document.getElementById(c).style.display = "none"
document.getElementById(i).src = "images/plus.gif"
return false
}
if(document.getElementById(c).style.display == "none"){
document.getElementById(c).style.display = "inline"
document.getElementById(i).src = "images/minus.gif"
return false
}
}
//----------------------------------------------------------------
function delconfirm(){
return confirm ("?האם את/ה בטוח/ה שהנך מעוניינ/ת למחוק נתון זה \n מחיקת נתון אינה ניתנת לשחזור");
}
//----------------------------------------------------------------
