var __aspxAgent = navigator.userAgent.toLowerCase();
var __aspxOpera = (__aspxAgent.indexOf("opera") > -1);
var __aspxSafari = __aspxAgent.indexOf("safari") > -1;
var __aspxIE = (__aspxAgent.indexOf("msie") > -1 && !__aspxOpera);
var __aspxNotIEOperaSafari = !__aspxSafari && !__aspxIE && !__aspxOpera;
var __aspxFirefox = (__aspxAgent.indexOf("firefox") > -1) && __aspxNotIEOperaSafari;
var __aspxMozilla = (__aspxAgent.indexOf("mozilla") > -1) && __aspxNotIEOperaSafari;
var __aspxNetscape = (__aspxAgent.indexOf("netscape") > -1) && __aspxNotIEOperaSafari;
var __aspxNS = __aspxFirefox || __aspxMozilla || __aspxNetscape;
var debug = false;

if (!csr) {
    var csr = {};
    window.csr = window.csr || csr;
}

function trace(txt) {
    if (!debug) return;
    try { console.log(txt) } catch (e) { };
}

function filterColors(e) {

}


var vars = [], hash;

if (window.location.hash) {
    var singles = window.location.hash.slice(1).split('&');
    for (var i = 0; i < singles.length; i++) {
        var pair = singles[i].split('=');
        //        console.log(pair);
        if (pair[1] == undefined)
            pair[1] = "";
        vars[pair[0]] = pair[1];
    }
}

if (vars['debug'] != undefined) {
    debug = true;
}



// ------------------- Login Slider ------------------- 

$(document).ready(function() {
	$("div.panel_button").click(function(){
		$("div#LoginPane").animate({
			height: "400px"
		})
		.animate({
			height: "300px"
		}, "fast");
		$("div.panel_button").toggle();
	
	});	
	
   $("div#hide_button").click(function(){
		$("div#LoginPane").animate({
			height: "0px"
		}, "fast");
		
	
   });	
	
});


// ------------------- FAQ Slider ------------------- 

$(document).ready(function(){
//hide the all of the element with class msg_body
$('.FAQ_Answer').hide();
//toggle the componenet with class msg_body
$('.FAQ_Question').click(function(){
$(this).toggleClass('.FAQ_Question2').next('.FAQ_Answer').slideToggle(150);
});
});

// ------------------- ProZone Folders & Files Slider ------------------- 

$(document).ready(function(){
//hide the all of the element with class msg_body
$('.ProZone-Files').hide();
//toggle the componenet with class msg_body
$('.ProZone-Category').click(function(){
$(this).toggleClass('.ProZone-Category2').next('.ProZone-Files').slideToggle(150);
});
});




function uploadTextChanged(s, e, divname) {
    if (s.GetText() != '') {
        $('#'+divname).html('Uploading...');
        $('#'+divname).css('color', 'black');
        s.Upload();
    }
}
function uploadComplete(s,e,divname)
{
    if(e.isValid) {
        $('#' + divname).html('Successfully uploaded: ' + e.callbackData);
        $('#' + divname).css('color', 'green');
	}
    else {
        $('#' + divname).html('Failed to upload: ' + e.callbackData);
        $('#' + divname).css('color', 'red');
    }
}
function GetKeyCode(srcEvt) {
    return __aspxNS ? srcEvt.which : srcEvt.keyCode;
}
function ButtonClickOnEnter(sender, evt, btnName) {
    var key = GetKeyCode(evt);
    /*var key = ASPxClientUtils.GetKeyCode(evt);*/
    if (typeof console != 'undefined') { console.log('Keypress raised: ' + key); }
    if (key == 13) {
        btnName.DoClick();
        _aspxPreventEvent(evt);
    }
}






