var MenuHide = "Gizle";
var MenuShow = "Göster";

function setComment(OwnerId, SectionId, Page) {
    var CommentText = $("#" + Page + "CommentText" + SectionId).val();
    xajax_setComment(OwnerId, SectionId, Page, CommentText);
}

function CityChange(SelectId, CityDomID) {
    xajax_CityChange(SelectId, CityDomID);
}

function notifStart() {
    $("#Notification_SectionSimple").easySlider( {
	prevText :'Daha Yeni Mesajlar',
	nextText :'Daha Eski Mesajlar',
	orientation :'vertical'
    });
}

function ControlBarButton() {
    $("#usrFavs").slideToggle("slow", function() {
	if ($("#HeaderMenu").height() < 50) {
	    $("#MenuLinkText").html(MenuShow);
	} else {
	    $("#MenuLinkText").html(MenuHide);
	}
    });

}

function ModalWindowClose() {
    xjxmW.closeWindow();
}

function NewPopup(url, width, height) {
    newwindow = window.open(url, 'name', "height=" + height + ",width=" + width
	    + ",scrollbars=yes");
    if (window.focus) {
	newwindow.focus();
    }
    return false;
}


function CreateHowDoMadeMessage(DOMId, Private) {
    if ($.browser.msie) {
        $('.ToolTipCase').bt( {
            positions: 'top',            
            padding :20,
            width :120,
    	centerPointY: .3,
    	centerPointX: .9,
            spikeLength :25,
            spikeGirth :19,     
            cornerRadius :30,
            fill :'rgba(0, 0, 0, .8)',
            strokeWidth :2,
            strokeStyle :'#F1A506',
            cssStyles : {
        	color :'#FFF',
        	fontWeight :'bold'
            }
        });
    }else{
        $('.ToolTipCase').bt( {
            padding :20,
            width :120,
    	centerPointY: .1,
    	centerPointX: .9,
            spikeLength :25,
            spikeGirth :19,     
            cornerRadius :20,
            fill :'rgba(0, 0, 0, .8)',
            strokeWidth :2,
            strokeStyle :'#F1A506',
            cssStyles : {
        	color :'#FFF',
        	fontWeight :'bold'
            }
        });
    }
}
function toolTipChange(){
    xajax_ToolTipChange($("#MainCategory").val());

}


function refreshUser() {
    window.location = "index.php";
}



function createCookie(name, value, days) {
    if (days) {
	var date = new Date();
	date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
	var expires = "; expires=" + date.toGMTString();
    } else
	var expires = "";
    document.cookie = name + "=" + value + expires + "; path=/";
}

function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for ( var i = 0; i < ca.length; i++) {
	var c = ca[i];
	while (c.charAt(0) == ' ')
	    c = c.substring(1, c.length);
	if (c.indexOf(nameEQ) == 0)
	    return c.substring(nameEQ.length, c.length);
    }
    return null;
}



