function b_click(object_id) {
    document.getElementById(object_id).src = "Style/Images/Buttons/" + object_id + "_active.gif";
}
function b_out(object_id) {
    document.getElementById(object_id).src = "Style/Images/Buttons/" + object_id + "_passive.gif";
 }
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function side_menu_pressed(element) 
{
    element.setAttribute("class", "side_panel_menu side_panel_menu_over");
    element.setAttribute("className", "side_panel_menu side_panel_menu_over");
    element.setAttribute("onmouseout", "");
    element.setAttribute("onmouseover", "");
    return true;
}
function side_menu_over(element) 
{
    element.setAttribute("class", "side_panel_menu side_panel_menu_over");
    element.setAttribute("className", "side_panel_menu side_panel_menu_over");
}

function side_menu_out(element) 
{
    element.setAttribute("class", "side_panel_menu");
    element.setAttribute("className", "side_panel_menu");
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function logo_over(element) {
    alert(element.src);
    element.src = 'Style/Images/Logo/logo-active.png';
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function main_menu_pressed(element) {
    element.setAttribute("class", "main_menu_item main_menu_item_pressed");
    element.setAttribute("className", "main_menu_item main_menu_item_pressed");
    element.setAttribute("onmouseout", "");
    element.setAttribute("onmouseover", "");
    return true;
}
function main_menu_over(element) {
    element.setAttribute("class", "main_menu_item main_menu_item_pressed");
    element.setAttribute("className", "main_menu_item main_menu_item_pressed");
}

function main_menu_out(element) {
    element.setAttribute("class", "main_menu_item");
    element.setAttribute("className", "main_menu_item");
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

function enter(object) 
{
  if ((event.which && event.which == 13) || (event.keyCode && event.keyCode == 13)) 
  {
    javascript: __doPostBack(object, '');
    return false;
  }
  else 
    return true;
}

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/*
    Use on Friends.aspx page for remove friend
*/
function delFriend(friendId, divId, okBtnId) {    
    var _div = document.getElementById(divId);
    var _btnOk = document.getElementById(okBtnId);    
    _btnOk.href = "Friends.aspx?remove=" + friendId;    
    _div.style.display = 'block';

}

/*
Use on Friends.aspx page for cancel remove friend
*/
function cancelDelFriend(divId) {
    var _div = document.getElementById(divId);
    _div.style.display = 'none';
}

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

/*
Use on PhotoView.aspx page for remove comment
*/
function delComment(photoId, commentId, divId, okBtnId) {
    var _div = document.getElementById(divId);
    var _btnOk = document.getElementById(okBtnId);
    _btnOk.href = "PhotoView.aspx?photo="+photoId + "&commentid=" + commentId + "&action=delete";
    _div.style.display = 'block';

}

/*
Use on PhotoView.aspx page for cancel remove comment
*/
function cancelDelComment(divId) {
    var _div = document.getElementById(divId);
    _div.style.display = 'none';
}


function button_width_click(element, width) {
    element.setAttribute("class", "button_" + width + " button_" + width + "_down");
    element.setAttribute("className", "button_" + width + " button_" + width + "_down");
}
function button_width_out(element, width) {
    element.setAttribute("class", "button_" + width);
    element.setAttribute("className", "button_" + width);
}


//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Used in Messanger
function openContact(url, name, width, height) {
	if (!width) width = 500;
    if (!height) height = 620;
    var left = parseInt((screen.availWidth / 2) - (width / 2));
    var top = parseInt((screen.availHeight / 2) - (height / 2));
    var w = window.open(url, name, "width=" + width + ",height=" + height +
        ",resizable=1,toolbar=0,location=0,status=0,menubar=0,directories=0,scrollbars=auto,top=" + top + 
        ",screenY=" + top + ",screenX=" + left+ ",left=" + left);
    w.focus();
}
function openEmotions(url, name, width, height) {
    if (!width) width = 400;
    if (!height) height = 400;
    var left = parseInt((screen.availWidth / 2) - (width / 2));
    var top = parseInt((screen.availHeight / 2) - (height / 2));
    var w = window.open(url, name, "width=" + width + ",height=" + height +
        ",resizable=1,toolbar=0,location=0,status=0,menubar=0,directories=0,scrollbars=auto,top=" + top +
        ",screenY=" + top + ",screenX=" + left + ",left=" + left);
    w.focus();
}

/*
Used to submit textboxes by Ctrl+Enter
*/
function textboxClick(event1, buttonID) {
    if ((event1.keyCode == 10) || ((event1.ctrlKey) && (event1.keyCode == 13))) {
        __doPostBack(buttonID, '');
    }
}      
