﻿// JScript File
function changeColor(tag)
{
   tag.style.bold="inline";
  
   
}
function changeToPreviousColor(tag)
{
    tag.style.bold="none";
   
    
}

function changeBackgroundColor(tag)
{
    tag.style.background="#A4D0FD";
   
    
}

function changeToPreviousBackgroundColor(tag,colorBG)
{
    tag.style.background=colorBG;
   
    
}

//function deleteText(tag)
//{
//    tag.value="";
//}

 function NavigateFromMenu()
  {
        javascript:window.open("http://community.walla.co.il/?w=/316/2563");
  }    

 function Navigate(txtSearch)
  {
        
        javascript:window.open("http://www.google.com/search?ie=UTF-8&oe=UTF-8&q="+txtSearch);
  }   
  
function checkForGoogleSearch()
{
    if (document.getElementById("google_url"))
    {
        
        
        googleWin=window.open(document.getElementById("google_url").value,"googleWin","width=550,height=550")
        
    }
} 

function changeImg(img,graphic_file)
{
   
   document.getElementById(img).src =graphic_file;
   
   
   
}
function changeToPreviousImg(img,graphic_file)
{
    
    document.getElementById(img).src = graphic_file;
     
}

//function changeImg(img)
//{
//  
//   document.getElementById(img).src = "images/news_over.gif";
//   
//   
//   
//}
//function changeToPreviousImg(img)
//{
//    
//    document.getElementById(img).src = "images/news.gif";
//    
//}

//function changeImgeEnglish(img)
//{
//  
//   document.getElementById(img).src = "images/news_e_over.gif";
//   
//   
//   
//}
//function changeToPreviousImgEnglish(img)
//{
//    
//    document.getElementById(img).src = "images/news_e.gif";
//    
//}

function showGallery(imgPath,itemID,catID)
{
    var org = document.URL;
	var what = /&/g;
	var newStr = org.replace(what,'@@@');
	var source = 'bigGallery.asp?path='+ imgPath + '&id='+ itemID+'&cat='+ catID +'&urlPath=' + newStr;
	win = window.open(source, "galleryBig", "top=0, left=0, status=no, resizable, scrollbars=yes")
}

// open the window for big picture.	
function showBig (path,nameP) {
	var org = document.URL;
	var what = /&/g;
	var newStr = org.replace(what,'@@@');
	var source = 'imgBig.asp?path='+ path + '&name=' + nameP + '&urlPath=' + newStr;
	win = window.open(source, "imgBig", "top=0, left=0, status=no, resizable, scrollbars=yes")
}

function firstClear(obj)
{
  if(obj.clearThis == undefined)
  {
    obj.value = '';
    obj.clearThis = true;
  }
}

function checkPassword()
{
    if((document.all.txtPassword.value=="") || (document.all.txtPassword.value=="סיסמא:") )
    {
        document.all.pass.innerHTML="<b style='color:Red'>&nbsp;הכנס סיסמא</b>";
        return;
    }
    else if(document.all.txtPassword.value!="111")
    {
        document.all.pass.innerHTML="<b style='color:Red'>&nbsp;סיסמא שגויה</b>";
        return;
    }
    else
    {
        window.location="studentsPage.aspx?id=63";
    }
}
