﻿<!--

/*
var xhttp;

function ExitChat(t)
{           
    if (document.all) 
    { 
        xhttp = new ActiveXObject("Msxml2.XMLHTTP"); 
    } 
    else 
    { 
        xhttp = new XMLHttpRequest(); 
    }
                
    xhttp.onreadystatechange = HandlerOnReadyStateChange;
    
    xhttp.open('GET','http://www.motke.co.il/chatwebservice.asmx/CloseDoor?session=' + t, true);
    xhttp.send(); 
}
*/

function $(i){
    return document.getElementById(i);
};


/*Start of personal menu*/
function showPersonalMenu(o){
    
};

function hidePersonalMenu(o){
    
};
/*end of personal menu*/

/*Start of Forums Messegas*/
function makeLink(this_field){
    if (document.selection){
  	    var str = document.selection.createRange().text;
  	    if(str.length > 0){
  		    document.getElementById(this_field).focus();
      		
  		    var my_link = prompt("URL כתובת","http://");

  		    if (my_link != null && my_link.length > 2){
  			    if(my_link.match("http://") == null){
				    my_link = "http://" + my_link;
			    }
    			
    		    var sel = document.selection.createRange();
			    sel.text = "[a href='" + my_link + "' id='link']" + str + "[/a]";
  		    }
  		    return;
  	    }
  	    else{
  		    return alert('יש לסמן את הטקסט ממנו יבוצע הקישור ולהקיש על הכפתור');
  	    }
  	}
  	else if (document.getSelection || window.getSelection){
  	    var str = document.getElementById(this_field).value.substring(document.getElementById(this_field).selectionStart,document.getElementById(this_field).selectionEnd);
      	
  	    if(str.length > 0){
  		    document.getElementById(this_field).focus();
  		    var my_link = prompt("URL כתובת","http://");
  		    if (my_link != null && my_link.length > 2) {
  			    if(my_link.match("http://") == null){
				    my_link = "http://" + my_link;
			    }
    			
    		    var area = document.getElementById(this_field);
			    area.value = area.value.substr(0, area.selectionStart) + "[a href='" + my_link + "' id='link']" + str + "[/a]" + area.value.substr(area.selectionEnd);
  		    }
  		    return;
  	    }
  	    else{
  		    return alert('יש לסמן את הטקסט ממנו יבוצע הקישור ולהקיש על הכפתור');
  	    }
  	}
};
/*END of Forums Messegas*/

function getScroll(field){
	document.getElementById(field).value = document.body.scrollTop;
};
	
function scroll_Top(pixels){
	window.scrollBy(0,pixels); 
};

function scrollBottom(control){
    alert(control);
    //var divScroll = document.getElementById(control);
    //divScroll.scrollTop = divScroll.scrollHeight
};
        
function scrollToBottom(){
	document.getElementById("last_td").scrollIntoView(true);
};

function HandlerOnReadyStateChange(){
    if (xhttp.readyState==4){
        //alert(xhttp.readyState);
    }
};

function addFav(url,title){
    window.external.addFavorite(url, title); 
    return false;
};

function addHomePage(field){
    field.style.behavior='url(#default#homepage)';
    field.setHomePage('http://www.motke.co.il/'); 
    return false;
};

function LargerFontClass(){
    if(document.styleSheets){
        if (document.styleSheets(1).href != null){
            if (document.styleSheets(1).href.slice(8,9) < 3){
                var n = eval(document.styleSheets(1).href.slice(8,9)); 
                n = eval(n + 1);
                document.styleSheets(1).href = "fontsize" + n + ".css";
                var sss = document.styleSheets(1).href;
                SaveCookies(document.styleSheets(1).href);
            }
        }  
    }
};
   
function Hide(){
    document.forms[0].print_top.style.visibility='hidden';
    document.forms[0].print_bottom.style.visibility='hidden';
    document.forms[0].back_top.style.visibility='hidden';
    document.forms[0].back_bottom.style.visibility='hidden';
};
 
function Show(){
    document.forms[0].print_top.style.visibility='visible';
    document.forms[0].print_bottom.style.visibility='visible';
    document.forms[0].back_top.style.visibility='visible';
    document.forms[0].back_bottom.style.visibility='visible';
};
                                                     
function SmallerFontClass(){       
    if(document.styleSheets){
        if (document.styleSheets(1).href != null){
            if (document.styleSheets(1).href.slice(8,9) > 1){
                var n = eval(document.styleSheets(1).href.slice(8,9));
                n = eval(n - 1);
                document.styleSheets(1).href = "fontsize" + n + ".css";
                SaveCookies(document.styleSheets(1).href);
            }
        }  
    }
};

function SaveCookies(value){
    var name = 'motkestylesheet';
    var tmp = value;
    expires = new Date(); 
    expires.setTime(expires.getTime() + (1000 * 86400 * 365)); 
    SetCookies(name, tmp, expires); 
};

function SetCookies(name, value, expires){
    if (!expires){
        expires = new Date();
    }
    
    document.cookie = name + "=" + escape(value) + ";expires=" + expires.toGMTString() + ";path=/";
};

function GetStyleCookies(){
    document.styleSheets(1).href = GetCookies('motkestylesheet');
};

function GetCookies(name) 
{
     var arg = name + "=";
     var alen = arg.length;
     var clen = document.cookie.length;
     var endstr = 0;
     var i = 0;
     
     while (i < clen){
        var j = i + alen;
        if (document.cookie.substring(i, j) == arg){
            endstr = document.cookie.indexOf (";", j);
            if (endstr == -1){
                endstr = document.cookie.length;
            }
            return unescape(document.cookie.substring(j, endstr));
        }
        
        i = document.cookie.indexOf(" ", i) + 1;
        
        if (i == 0){ 
            break; 
        }
     }
     return 'fontsize1.css';
};

function openNews(ID) 
{
	NewsOpen = window.open('WinNews.aspx?new_id=' + ID,'WinNews',config='status=yes,menubar=no, toolbar=no,location=no,scrollbars=yes,width=400,height=275,top=100,left=100');
}

function AddReview(this_id){
	ReviewAdd = window.open('AddReviewsArticle.aspx?art=' + this_id,'ReviewAddWin',config='toolbar=no,location=no,scrollbars=no,width=400,height=480');
};

function RecipeResponseAdd(path,w,h){
    LeftPosition=(screen.width)?(screen.width-w)/2:0;
    TopPosition=(screen.height)?(screen.height-h)/2:0;
	Recipe_Add_Response = window.open(path,'ReviewAddWin',config='toolbar=no,location=no,top='+TopPosition+',left='+LeftPosition+',scrollbars=no,width='+w+',height='+h+"'");
};

function RecipeResponseOpen(path,w,h){
    LeftPosition=(screen.width)?(screen.width-w)/2:0;
    TopPosition=(screen.height)?(screen.height-h)/2:0;
	Recipe_Open_Response = window.open(path,'ReviewAddWin',config='toolbar=no,location=no,top='+TopPosition+',left='+LeftPosition+',scrollbars=no,width='+w+',height='+h+"'");
};

function AddBlogReview(this_id){
	OpenNewWin('AddReviewsBlog.aspx?blg=' + this_id,'Responses','400','480','yes','no','no','no');
};

function keyPress(textArea, maxLength){
    if(textArea.value.length > maxLength){
      	textArea.value = textArea.value.substring(0,maxLength);
	}
};

function OpenReview(id,no){
	ReviewOpen = window.open('OpenReviewsArticle.aspx?tgv=' + id + '&no=' + no,'ReviewOpenWin',config='status=yes,menubar=yes, toolbar=no,location=no,scrollbars=yes,width=400,height=400,top=100,left=100');
};
	
function OpenBlogReview(id,no){
	OpenNewWin('OpenReviewsBlog.aspx?tgv=' + id + '&no=' + no,'Responses','400','400','yes','no','no','no');
};

function OpenMessage(id){
	OpenNewWin('OpenUsersMessage.aspx?msgID=' + id,'OpenUsersMessage','520','525','yes','no','no','no');
};

function OpenMessage_2(id,userId){
    document.getElementById("spn"+id).className='GenericLinkR';
    new AJAX(
    {
        type: "GET",
        url: "Generic_Updater.aspx?itemId="+id+"&uId="+userId+"&sp=Messages_Update_Readed",
        method: "UPDATE",
        async: true,
        cb : "OpenMessage_Res(xmlHttp.responseText)"
    });
	OpenNewWin('OpenUsersMessage.aspx?msgID=' + id,'OpenUsersMessage','520','525','yes','no','no','no');
};

function OpenMessage_Res(res){
    var i=parseInt(res);
    if(i>0){
        document.getElementById(spnMesMain8541).innerHTML="<img alt='' title='" + i + " הודעות שלא נקראו' class='Env' src='images/icons/envelope_full.gif' /> הודעות <span style='font-size:11px;'>(" + i + ")</span>";
        document.getElementById(spnInc951).innerHTML="הודעות נכנסות <span style='font-size:11px;'>("+i+" הודעות חדשות)</span>";
    }
    else{
        document.getElementById(spnMesMain8541).innerHTML="<img alt='' title='אין הודעות חדשות' class='Env' src='images/icons/envelope.gif' /> הודעות";
        document.getElementById(spnInc951).innerHTML="הודעות נכנסות";
    }
};

function OpenSentMessage(id){
	OpenNewWin('OpenSentUsersMessage.aspx?msgID=' + id,'OpenUsersMessage','520','525','yes','no','no','no');
};

function OpenSentMessage(id){
	OpenNewWin('OpenSentUsersMessage.aspx?msgID=' + id,'OpenUsersMessage','520','525','yes','no','no','no');
};

function count_change(size,field,info){
	MaxLen  = size; 
	Msg     = window.document.getElementById(field).value;
	Msglen  = Msg.length;

	if (Msglen > MaxLen){
		window.document.getElementById(info).innerHTML 	= "<span style='color:#ff0000;font-size:11px;font-weight:bold;'>נא לא להכניס יותר מ-" + MaxLen + " תווים</span>";
		window.document.getElementById(field).value = Msg.substring(0,MaxLen);
	}
	else if (Msglen <= MaxLen){
		window.document.getElementById(info).innerHTML = MaxLen-Msglen + " תווים";
	}
};
	
function DisplayBody(elem){
    if (document.all){
	    if (document.getElementById(elem).style.display == 'block'){
		    document.getElementById(elem).style.display='none';
		    document.getElementById(elem).style.visibility='hidden';
	    }
	    else{
		    document.getElementById(elem).style.display = 'block';
		    document.getElementById(elem).style.visibility='visible';
	    }
	}
	else{
	    if (document.getElementById(elem).style.display == 'table-row'){
		    document.getElementById(elem).style.display='none';
		    document.getElementById(elem).style.visibility='hidden';
	    }
	    else{
		    document.getElementById(elem).style.display = 'table-row';
		    document.getElementById(elem).style.visibility='visible';
	    }
	}
};

function makeItalic(this_field){
    if (document.selection){
  	    var str = document.selection.createRange().text;
  	    if(str.length > 0){
  		    document.getElementById(this_field).focus();
      		var sel = document.selection.createRange();
			    sel.text = "[i]" + sel.text + "[/i]";
  		    return;
  	    }
  	    else
  		    return alert('יש לסמן טקסט');
  	}
  	else if (document.getSelection || window.getSelection){
  	
  	    var str = document.getElementById(this_field).value.substring(document.getElementById(this_field).selectionStart,document.getElementById(this_field).selectionEnd);
  	    if(str.length > 0){
  		    document.getElementById(this_field).focus();
		    var area = document.getElementById(this_field);
		    area.value = area.value.substr(0, area.selectionStart) + "[i]" + str + "[/i]" + area.value.substr(area.selectionEnd);
  		    return;
  	    }
  	    else
  		   return alert('יש לסמן טקסט');
  	}
};

function makeUnderline(this_field){
    if (document.selection){
  	    var str = document.selection.createRange().text;
  	    if(str.length > 0){
  		    document.getElementById(this_field).focus();
      		var sel = document.selection.createRange();
			    sel.text = "[u]" + sel.text + "[/u]";
  		    return;
  	    }
  	    else
  		    return alert('יש לסמן טקסט');
  	}
  	else if (document.getSelection || window.getSelection){
  	
  	    var str = document.getElementById(this_field).value.substring(document.getElementById(this_field).selectionStart,document.getElementById(this_field).selectionEnd);
  	    if(str.length > 0){
  		    document.getElementById(this_field).focus();
		    var area = document.getElementById(this_field);
		    area.value = area.value.substr(0, area.selectionStart) + "[u]" + str + "[/u]" + area.value.substr(area.selectionEnd);
  		    return;
  	    }
  	    else
  		   return alert('יש לסמן טקסט');
  	}
};

function makeBold(this_field){

    if (document.selection){
  	    var str = document.selection.createRange().text;
  	    if(str.length > 0){
  		    document.getElementById(this_field).focus();
      		var sel = document.selection.createRange();
			    sel.text = "[b]" + sel.text + "[/b]";
			    
  		    return;
  	    }
  	    else
  		    return alert('יש לסמן את הטקסט אותו ברצונך להדגיש');
  	}
  	else if (document.getSelection || window.getSelection){
  	
  	    var str = document.getElementById(this_field).value.substring(document.getElementById(this_field).selectionStart,document.getElementById(this_field).selectionEnd);
  	    if(str.length > 0){
  		    document.getElementById(this_field).focus();
		    var area = document.getElementById(this_field);
		    area.value = area.value.substr(0, area.selectionStart) + "[b]" + str + "[/b]" + area.value.substr(area.selectionEnd);

  		    return;
  	    }
  	    else
  		    return alert('יש לסמן את הטקסט אותו ברצונך להדגיש');
  	}
};

//function setColor(color){
//    var oSelection=document.selection.createRange();
//	if(oSelection.text){
//		oSelection.text = "[color:" + color + " id='123']" + oSelection.text + "[/color]";
//	}
//};

function setColor(this_field, color){

    if (document.selection){
  	    var str = document.selection.createRange().text;
  	    if(str.length > 0){
  		    document.getElementById(this_field).focus();
      		var sel = document.selection.createRange();
			    sel.text = "[color:" + color + " id='123']" + sel.text + "[/color]";
			    
  		    return;
  	    }
  	    else
  		    return alert('יש לסמן את הטקסט אותו ברצונך לצבוע');
  	}
  	else if (document.getSelection || window.getSelection){
  	
  	    var str = document.getElementById(this_field).value.substring(document.getElementById(this_field).selectionStart,document.getElementById(this_field).selectionEnd);
  	    if(str.length > 0){
  		    document.getElementById(this_field).focus();
		    var area = document.getElementById(this_field);
		    area.value = area.value.substr(0, area.selectionStart) + "[color:" + color + " id='123']" + str + "[/color]" + area.value.substr(area.selectionEnd);

  		    return;
  	    }
  	    else
  		    return alert('יש לסמן את הטקסט אותו ברצונך לצבוע');
  	}
};


function HidSpan(){
    if (document.getElementById("vis_hid").style.display == 'none'){
        document.getElementById("vis_hid").style.display = 'block';
    }
    else{
        document.getElementById("vis_hid").style.display = 'none';
    }
};


function getDisableTimeOut(obj, ms){
    obj.disabled = true;
    var t = setTimeout(function(){document.getElementById(obj.id).disabled = false;}, ms);
};


function doClick(buttonName, e){
//the purpose of this function is to allow the enter key to 
//point to the correct button to click.
    var key;
    if(window.event){
        key = window.event.keyCode; //IE
        if (key == 13){ //Get the button the user wants to have clicked
            var btn = document.getElementById(buttonName);
            if (btn != null){ //If we find the button click it
                btn.click();
                event.keyCode = 0;
            }
        }
    }
    else{
        key = e.which; //firefox
        if (key == 13){ //Get the button the user wants to have clicked
            var btn = document.getElementById(buttonName);
            if (btn != null){ //If we find the button click it
                btn.onclick();
                event.keyCode = 0;
            }
        }
    }
};

function doClickFocus(buttonName, e, txtFocus){
//the purpose of this function is to allow the enter key to 
//point to the correct button to click.
    document.getElementById(txtFocus).focus();
    var key;
    if(window.event){
        key = window.event.keyCode; //IE
        if (key == 13){ //Get the button the user wants to have clicked
            var btn = document.getElementById(buttonName);
            if (btn != null){ //If we find the button click it
                btn.click();
                event.keyCode = 0;
            }
        }
    }
    else{
        key = e.which; //firefox
        if (key == 13){ //Get the button the user wants to have clicked
            var btn = document.getElementById(buttonName);
            if (btn != null){ //If we find the button click it
                btn.onclick();
                event.keyCode = 0;
            }
        }
    }
};


function doClick_Search(buttonName, e, txtSearch){
    //the purpose of this function is to allow the enter key to 
    //point to the correct button to click.
        var key;
        if(window.event){
            key = window.event.keyCode; //IE
            if (key == 13)
                SearchUser(txtSearch, 'divSearch');
                return false;
        }
        else{
            key = e.which; //firefox
            if (key == 13)
                SearchUser(txtSearch, 'divSearch');
        }
};


function Search(txtBox){
    window.open("ForumSearchList.aspx?s="+$(txtBox).value,"_self");
};

function getFocus(){
    document.getElementById('search').focus();
};

function GoToUrl(url){
    window.open(url,"_self");
};

function DisplayBodyWithImage(elem,url,lbl){
    //alert([elem,url,lbl]);
    var patt=new RegExp("fantome.gif|NI");
    var im='';
    if(url.length>0&&url!=''&&patt.test(url)!=true){
        patt=/.gif|.jpg/gi;
        if(patt.test(url)){//image
            im="<img alt='' src='http://www.motke.co.il/UploadFiles/"+url+"' />";
            //im="<img alt='' src='"+url_prefix+"UploadFiles/"+url+"' />";
        }
        patt=/.pdf/gi;
        if(patt.test(url)){ // doc [pdf]
            im="<a rel='nofollow' class='Green' target='_blank' href='http://www.motke.co.il/UploadFiles/"+url+"'><img class='Generic' alt='' src='"+url_prefix+"images/icons/pdf.gif' /> מסמך PDF</a>";
        }    
    }
    else{
        im='';
    }
	 if (document.all){
        if ($(elem).style.display == 'block')
	    {
		    $(elem).style.display='none';
		    $(elem).style.visibility='hidden';
	    }
	    else{
		    $(elem).style.display = 'block';
		    $(elem).style.visibility='visible';
		    $(lbl).innerHTML=im;
	    }
	 }
	 else{
        if ($(elem).style.display == 'table-row'){
		    $(elem).style.display='none';
		    $(elem).style.visibility='hidden';
	    }
	    else{
		    $(elem).style.display = 'table-row';
		    $(elem).style.visibility='visible';
		    $(lbl).innerHTML=im;
	    }        
	}
};

function inconer(field,icon,max){
    var len=(icon.length+2) + document.getElementById(field).value.length;
    if(len>max){
        alert('עד ' + max + ' תווים');
        return;
    }
  	$(field).focus();
  	
  	if(document.selection){
  	    var sel=document.selection.createRange();
	    sel.text="|"+icon+"|";
  	}
  	else{
        cursorer(field, "|"+icon+"|");
  	}
  	return;
};


function cursorer(myf, ico){ //IE support
    var fld = document.getElementById(myf);
    if (document.selection){
        fld.focus();
        sel = document.selection.createRange();
        sel.text = ico;
    }
    else if (fld.selectionStart || fld.selectionStart == '0'){// MOZILLA/NETSCAPE support
        var startPos = fld.selectionStart;
        var endPos = fld.selectionEnd;
        var insertFlag = true;
        if(fld.value.length==0){
            fld.value+=ico;
        }
        else{
            fld.value=fld.value.substring(0, startPos) + ico + fld.value.substring(endPos, fld.value.length);
        }
    } 
    else{
        fld.value +=ico;
    }
};

function ICN(icn){
    return icn.replace("|alarm|", IconsImage("alarm.gif")).replace("|bomb|", IconsImage("bomb.gif")).replace("|cake|", IconsImage("cake.gif"))
    .replace("|chat|", IconsImage("chat.gif"))
    .replace("|smile|", IconsImage("emoticon_smile.gif"))
    .replace("|wink|", IconsImage("emoticon_wink.gif"))
    .replace("|heart|", IconsImage("heart.gif"))
    .replace("|break|", IconsImage("heart_break.gif"))
    .replace("|crown|", IconsImage("crown.gif"))
    .replace("|lifebuoy|", IconsImage("lifebuoy.gif"))
    .replace("|lightbulb|", IconsImage("lightbulb.gif"))
    .replace("|music|", IconsImage("music.gif"))
    .replace("|cry|", IconsImage("smiley_cry.gif"))
    .replace("|yell|", IconsImage("smiley_yell.gif"))
    .replace("|tongue|", IconsImage("tongue.gif"))
    .replace("|car|", IconsImage("car.gif"))
    .replace("|mad|", IconsImage("mad.gif"))
    .replace("|smiley_red|", IconsImage("smiley_red.gif"))
    .replace("|slim|", IconsImage("slim.gif"))
    .replace("|joystick|", IconsImage("joystick.gif"))
    .replace("|link|", IconsImage("link.gif"))
    .replace("|lock|", IconsImage("lock.gif"))
    .replace("|female|", IconsImage("female.gif"))
    .replace("|male|", IconsImage("male.gif"))
    .replace("|medal_gold|", IconsImage("medal_gold.gif"))
    .replace("|palette|", IconsImage("palette.gif"))
    .replace("|pill|", IconsImage("pill.gif"))
    .replace("|confuse|", IconsImage("confuse.gif"))
    .replace("|trophy|", IconsImage("trophy_silver.gif"))
    .replace("|cool|", IconsImage("cool.gif"));
    //ALERT(icn);
};

function IconsImage(icon){
        return "<img alt='' style='vertical-align:text-bottom;border-width:0px;' src='images/icons/" + icon + "' />";
};

function insertAtCursor_1(fld, val){
  //IE support
  if(document.selection){
        fld.focus();
        sel = document.selection.createRange();
        sel.text = val;
  }
  else if (fld.selectionStart || fld.selectionStart == '0'){//MOZILLA/NETSCAPE support
        var startPos = fld.selectionStart;
        var endPos = fld.selectionEnd;
        fld.value = fld.value.substring(0, startPos) + val + fld.value.substring(endPos, fld.value.length);
  }
  else{
        fld.value += val;
  }
};

function reveal_Form(trId){
    if ($(trId).style.display == 'none'){
        $(trId).style.display = 'block';
    }
    else{
        $(trId).style.display = 'none';
    }
};

function hide_Form(trId,spn,message,color){
    $(trId).style.display='none';
    $(spn).innerHTML=message;
    $(spn).style.color=color;
};

function openWin(url,win,prop){
	window.open(url,win,prop);
};

var win = null;
function OpenNewWin(mypage,myname,w,h,scroll,resizable,titlebar,toolbar){
    LeftPosition=(screen.width)?(screen.width-w)/2:0;
    TopPosition=(screen.height)?(screen.height-h)/2:0;
    settings='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=' + resizable + ',titlebar=' + titlebar + ',toolbar=' + toolbar;
    win=window.open(mypage,myname,settings);
};

function ALERT(mess){
    errorWindow=window.open('', '_blank', 'resizable=yes,scrollbars=yes, width=1000, height=600');//OpenNewWin('TESTER.htm','ff','450', '150','no','no','no','no');
    errorWindow.document.write("<link id='stylesheet0' href='site.css' rel='stylesheet' type='text/css' /><link href='css/Motke.css' rel='stylesheet' type='text/css' /><body dir='rtl' style='font-famely:Arial;'>"+mess+"</body>");
    errorWindow.focus();
}

function error(e, err){
        errorWindow=OpenNewWin('','','450', '150','no','no','no','no');
        errorWindow.document.write("<span " + 
        styleHead + ">Error:</span><br /><span " +
        styleError + " >" + 
        "Error type: "  + e.name + "<br />" + 
        "Function: "  + err + "<br />" + 
        "Error description: " + e.message + "</span>");
        errorWindow.focus();
}

//-->

function SearchUser(txtId, divId){
    this.txtId=txtId;
    if($(txtId).value.length>1){
        window.open("Profiles.aspx?susr="+$(txtId).value, "_self");
        //window.location.href=url_prefix+"Profiles.aspx?susr="+$(txtId).value;
    }
    else{
        $(divId).innerHTML='יש להזין לפחות 2 אותיות';
        $(divId).style.visibility='visible';
        var aryPosition=ObjectPosition($(txtId));
        $(divId).style.top=aryPosition[1] + 20 + "px";
        $(divId).style.left=aryPosition[0] + 20 + "px";
    }
        $(txtId).onfocus=function(){
        $(divId).style.visibility='hidden';
    };
};

function Hide_initTxt(o){
    if($(o).value=='חיפוש חברים'){
        $(o).value='';   
    }
    else if($(o).value==''){
        $(o).value='חיפוש חברים'; 
    }
};

function InitTxt(o){
    if($(o).value==''){
        $(o).value='חיפוש חברים'; 
    }
};

function SearchMe(field, info){
	if (document.getElementById(field).value.length <= 1){
		document.getElementById(info).innerHTML = "הכנס לפחות 2 תווים";
	}
	else{
	    var v_a=document.getElementById(field).value;
	    window.location=Link_Prefix+'Profiles.aspx?susr='+v_a;
	}
};


function colorRow(o){
    //alert(color);
    var x=document.getElementById(o.id);
    if(x.style.backgroundColor!="#FFFF99"){
        x.style.backgroundColor="#FFFF99";
//        x.style.cursor="pointer";
    }
};

function backToOrig(o,color){
    var x=document.getElementById(o.id);
    x.style.backgroundColor=color;
    x.style.cursor="arrow";
};
