	function setHomePage()
	{
		document.body.style.behavior='url(#default#homepage)';
		document.body.setHomePage('http://www.asfir.co.il');
	}
    
	function Win(URL, name, width, height)
	{
		var x = screen.width;
		var y = screen.height;
		x=(x/2)-(width/2);
		y=(y/2)-(height/2);
		var wini = window.open(URL, name, "top="+y+",left="+x+",toolbar=no,location=no,status=no,menubar=no,scrollbars=no,width="+width+",height="+height+",resizable=no");
		wini.window.focus();
	}
	
        currentID = "<%= MENU_BAR %>"	
	    function OverBar(id)
	    {
		    if(id != currentID)
			    document.getElementById("tdBar" + id).style.backgroundImage = "url(images/RightBarOver_02.gif)";
	    }
	    function OutBar(id)
	    {
		    if(id != currentID)
			    document.getElementById("tdBar" + id).style.backgroundImage = "url(images/RightBar_02.gif)";
	    }

	    function OverBarEN(id)
	    {
		    if(id != currentID)
                
			    document.getElementById("tdBarEN" + id).style.backgroundImage = "url(images/buttonEN_over.jpg)";
	    }
	    function OutBarEN(id)
	    {
		    if(id != currentID)
			    document.getElementById("tdBarEN" + id).style.backgroundImage = "url(images/buttonEN.jpg)";
	    }

    
    var bookmarkurl="http://www.asfir.co.il"
    var bookmarktitle="Asfir"

    function addbookmark(){
    if (document.all)
    window.external.AddFavorite(bookmarkurl,bookmarktitle)
    }
    
    function OverRoomDIV()
    {
        var str = "<iframe scrolling='no' frameborder='0' width='122' height='274' src='RoomSelect.asp' name='Room' id='Domain'></iframe>"
        document.getElementById('sRoomDIV').innerHTML = str;
    }

    function OverToolDIV()
    {
        var str = "<iframe scrolling='no' frameborder='0' width='123' height='274' src='ToolSelect.asp' name='Tool' id='Domain'></iframe>"
        document.getElementById('sToolDIV').innerHTML = str;
    }

    function OverMoveDIV()
    {
        var str = "<iframe scrolling='no' frameborder='0' width='122' height='274' src='MoveSelect.asp' name='Move' id='Domain'></iframe>"
        document.getElementById('sMoveDIV').innerHTML = str;
    }
    
    function RoomsDIV()
    {
        var str = "<iframe scrolling='no' frameborder='0' width='122' height='75' src='RoomSelect2.asp' name='Room' id='Domain'></iframe>"
        document.getElementById('Rooms').innerHTML = str;
    }

    function ToolsDIV()
    {
        var str = "<iframe scrolling='no' frameborder='0' width='123' height='75' src='ToolSelect2.asp' name='Tool' id='Domain'></iframe>"
        document.getElementById('Tools').innerHTML = str;
    }

    function MovesDIV()
    {
        var str = "<iframe scrolling='no' frameborder='0' width='122' height=75' src='MoveSelect2.asp' name='Move' id='Domain'></iframe>"
        document.getElementById('Moves').innerHTML = str;
    }
    
    
    function isEmailAddr(email)
    {
    var result = false
    var theStr = new String(email)
    var index = theStr.indexOf("@");
    if (index > 0)
    {
	    var pindex = theStr.indexOf(".",index);
	    if ((pindex > index+1) && (theStr.length > pindex+1))
	    result = true;
    }
    return result;
    }

    function Checkfields(){
	
    if(document.all["ContactMan"].value==""){
    alert("שדה \"איש קשר\" חייב להיות מלא")
    document.all["ContactMan"].focus();
    return 0
    }

	
    if(document.all["Email"].value!="")
    {
    if (!isEmailAddr(document.all["Email"].value))
    {
	    alert(" yourname@yourdomain.com :אנא מלא כתובת אימייל תקנית");
	    document.all["Email"].focus();
	    return 0;
    }
    if (document.all["Email"].value.length < 3)
    {
	    alert(" \"אימייל\" אנא מלא לפחות 3 תווים בשדה אימייל.");
	    document.all["Email"].focus();
	    return 0;
    }	
    }
	
    if(document.all["Phone"].value==""){
    alert("שדה \"טלפון\" חייב להיות מלא")
    document.all["Phone"].focus();
    return 0
    }

    if(document.all["More"].value==""){
    alert("שדה \"הערות\" חייב להיות מלא")
    document.all["More"].focus();
    return 0
    }
	  
     document.contactf.submit(); 
    }
    
    function JSFX_StartEffects()
    {
	    var top = 0;
	    var step = 20;
	    myNav0 = new JSFX.LeftSlidingDiv(JSFX.findLayer("nav0"), -340,  top+=step);
    }
    
    
     function SendContact(){
	
    if(document.all["fullname"].value==""){
    alert("שדה \"שם מלא\" חייב להיות מלא")
    document.all["fullname"].focus();
    return 0
    }

	
    if (!isEmailAddr(document.all["email"].value))
    {
	    alert(" yourname@yourdomain.com :אנא מלא כתובת אימייל תקנית");
	    document.all["email"].focus();
	    return 0;
    }
    if (document.all["email"].value.length < 3)
    {
	    alert(" \"אימייל\" אנא מלא לפחות 3 תווים בשדה אימייל.");
	    document.all["email"].focus();
	    return 0;
    }	
	
	  
     document.ShortContact.submit(); 
    }

    
