function getHDCat() {
	var moduleObj = new module();
	moduleObj.setServer("eu");
	moduleObj.bDebug = true;

	moduleObj.helpdeskCategory('lunia');
}

function HDCat(data){
	var x = $('#f_categorytype');
	x.html('<option value="-1">Select a Category</option>');
	$.each(data.List, function(i,item){
		if (item.CategoryType == '1'){
			var CategoryName = item.CategoryName + " (#)";
		}else{
				var CategoryName = item.CategoryName;
		}
		x.append('<option value="'+item.Idx+'" ctype="'+item.CategoryType+'">'+CategoryName+'</option>');
	});
}

function getLogIn(){
	var moduleObj = new module();
	moduleObj.setServer("eu");
	moduleObj.bDebug = true;
	moduleObj.logCheck(1);
}

function Error( data ){
	$('#loggedOut').show();
	$('#loggedIn').hide();
	$('#loggedIn #userID').html('');
	$('#form_username').html('<input class="username" id="userid" name="userid" style="height: 15px;" type="text" />');
	$('#form_email').html('<input type="text" class="email" id="f_email" name="f_email" style="height: 15px;" />');
	$('#view_history').hide();
}

function logCheck( data ){
	gameGNB.setGNB({"auth":"logout"});
	$('#loggedOut').hide();
	$('#loggedIn').show();
	$('#form_username').html('<input class="username" id="userid" name="userid" style="height: 15px;" value="'+data.List.userID+'" disabled="disabled" type="text" />');
	$('#form_email').html('<input type="text" class="email" id="f_email" name="f_email" style="height: 15px;" value="'+data.List.userEmail+'" disabled="disabled" />');
	$('#myHelpdeskHistory').show();
}

function confirmOGPForm() {
	document.OGPForm.submit();
}