/**
 *
 * Contains global javascript related to admin pages
 *
 * @version 1.0 
 * @author Ivor
 * @package WEB4 1.2
 * @copyright All intellectual property rights are reserved. 
 * @category  JavaScript
 * @since Unknown
 * @license http://www.netjam.nl/over-netjam/algemene-voorwaarden/index.html
 *
 *             _    _                 
 *  _ __   ___| |_ (_) __ _ _ __ ___  
 * | '_ \ / _ \ __|| |/ _` | '_ ` _ \ 
 * | | | |  __/ |_ | | (_| | | | | | |
 * |_| |_|\___|\__|/ |\__,_|_| |_| |_|
 *               |__/                 
*/

$(document).ready( function() {


});


/**
 * Global functions
 */

function reloadFromDbAlert() {

	$('#dbalter').html('&nbsp;');
	setTimeout( function() {
		window.location.href='#';
		parent.window.location.reload(true);
	},1000);
	 	
	
	
	
	

	
}

function ajaxLoading() {
	$('#wrapper').addClass('loading');
}

function ajaxStopLoading() {
	$('#wrapper').removeClass('loading');
}

function isdefined( variable)
{
    return (typeof(window[variable]) == "undefined")?  false: true;
}
function setSession(sKey,sValue) {
	 
	 
	 	 $.ajax({
	  		type: "POST",
	  		url: sLinkRoot+"/do/system/setsession",
	  		data: "key="+sKey+"&value="+sValue,
	  		dataType: "text",
	  		async: false
	 	 });
	
 
 }


function switchTab(sUrl) {
	setSession('aftertipedit',sUrl);
	$('#admin_form').submit();
}
