// JavaScript Document
function __fncAdd(){
	thisForm.txtWhat2Do.value = 'ADDNEW';
	thisForm.submit();
}

function __fncCheckSaveDetails(strId){
	if(trim($('cboPlan').value) == '0'){
		$('cboPlan').className	=	'inputComboRed';
		$('tdPlan').className	=	'inputLabelRed';
		$('cboPlan').focus();
		return false;
	}else{
		$('cboPlan').className	=	'inputCombo';
		$('tdPlan').className	=	'';
	}
	
	if(trim($('cboServer').value) == '0'){
		$('cboServer').className	=	'inputComboRed';
		$('tdServer').className		=	'inputLabelRed';
		$('cboServer').focus();
		return false;
	}else{
		$('cboServer').className	=	'inputCombo';
		$('tdServer').className	=	'';
	}
	
	if(trim($('txtInstallation').value) == ''){
		$('txtInstallation').className	=	'inputTextRed';
		$('tdInstallation').className		=	'inputLabelRed';
		$('txtInstallation').focus();
		return false;
	}else{
		$('txtInstallation').className	=	'inputText';
		$('tdInstallation').className	=	'';
	}
	
	if(trim($('txtMonthlyPayment').value) == ''){
		$('txtMonthlyPayment').className	=	'inputTextRed';
		$('tdmonthlyPay').className		=	'inputLabelRed';
		$('txtMonthlyPayment').focus();
		return false;
	}else{
		$('txtMonthlyPayment').className	=	'inputText';
		$('tdmonthlyPay').className	=	'';
	}
	
	if(trim($('txtSlots').value) == ''){
		$('txtSlots').className	=	'inputComboRed';
		$('tdSlots').className		=	'inputLabelRed';
		$('txtSlots').focus();
		return false;
	}else{
		$('txtSlots').className	=	'inputCombo';
		$('tdSlots').className		=	'';
	}
	
	if(trim($('txtPasswordOnServer').value) == '' && $('chkPasswordOnServer').checked == false){
		$('txtPasswordOnServer').className	=	'inputTextRed';
		$('tdPasswordOnServer').className	=	'inputLabelRed';
		$('txtPasswordOnServer').focus();
		return false;
	}else{
		$('txtPasswordOnServer').className	=	'inputText';
		$('tdPasswordOnServer').className	=	'';
	}
	
	if(trim($('txtControlPanel').value) == '' && $('chkControlPanel').checked == false){
		$('txtControlPanel').className	=	'inputTextRed';
		$('tdControlPanel').className	=	'inputLabelRed';
		$('txtControlPanel').focus();
		return false;
	}else{
		$('txtControlPanel').className	=	'inputText';
		$('tdControlPanel').className	=	'';
	}
	
	if(trim($('txtAntiCheat').value) == '' && $('chkAntiCheat').checked == false){
		$('txtAntiCheat').className	=	'inputTextRed';
		$('tdAntiCheat').className	=	'inputLabelRed';
		$('txtAntiCheat').focus();
		return false;
	}else{
		$('txtAntiCheat').className	=	'inputText';
		$('tdAntiCheat').className	=	'';
	}
	
	if(trim($('txtOnlineSupport').value) == '' && $('chkOnlineSupport').checked == false){
		$('txtOnlineSupport').className	=	'inputTextRed';
		$('tdOnlineSupport').className	=	'inputLabelRed';
		$('txtOnlineSupport').focus();
		return false;
	}else{
		$('txtOnlineSupport').className	=	'inputText';
		$('tdOnlineSupport').className	=	'';
	}
	
	if(trim($('txtAdminMode').value) == '' && $('chkAdminMode').checked == false){
		$('txtAdminMode').className	=	'inputTextRed';
		$('tdAdminMode').className	=	'inputLabelRed';
		$('txtAdminMode').focus();
		return false;
	}else{
		$('txtAdminMode').className	=	'inputText';
		$('tdAdminMode').className	=	'';
	}
	
	if(trim($('txtAmxMode').value) == '' && $('chkAmxMode').checked == false){
		$('txtAmxMode').className	=	'inputTextRed';
		$('tdAmxMode').className	=	'inputLabelRed';
		$('txtAmxMode').focus();
		return false;
	}else{
		$('txtAmxMode').className	=	'inputText';
		$('tdAmxMode').className	=	'';
	}
	
	if(trim($('txtTeamSpeak').value) == '' && $('chkTeamSpeak').checked == false){
		$('txtTeamSpeak').className	=	'inputTextRed';
		$('tdTeamSpeak').className	=	'inputLabelRed';
		$('txtTeamSpeak').focus();
		return false;
	}else{
		$('txtTeamSpeak').className	=	'inputText';
		$('tdTeamSpeak').className	=	'';
	}
	
	if(trim($('txtDescription').value) == ''){
		$('txtDescription').className	=	'inputTextareatestRed';
		$('tdDescription').className	=	'inputLabelRed';
		$('txtDescription').focus();
		return false;
	}else{
		$('txtDescription').className	=	'inputTextareatest';
		$('tdDescription').className	=	'';
	}
	
	if(trim($('txtShoppinCartLink').value) == ''){
		$('txtShoppinCartLink').className	=	'inputTextRed';
		$('tdShoppinCartLink').className	=	'inputLabelRed';
		$('txtShoppinCartLink').focus();
		return false;
	}else{
		$('txtShoppinCartLink').className	=	'inputText';
		$('tdShoppinCartLink').className	=	'';
	}
	
	if(strId){
		thisForm.txtId.value = strId;
		thisForm.txtWhat2Do.value = 'UPDATE';
		thisForm.submit();
	}else{
		thisForm.txtWhat2Do.value = 'SAVENEW';
		thisForm.submit();
	}
}

function __fncEdit(strId){
	thisForm.txtWhat2Do.value = 'EDIT';
	thisForm.txtId.value = strId;
	thisForm.submit();
}
function __fncDelete(strId, msg){
	if(!confirm(msg)){
		return;
	}
	thisForm.txtWhat2Do.value = 'DELETE';
	thisForm.txtId.value = strId;
	thisForm.submit();
}

function __fncChangeStatus(status, id){
	$('txtStatus').value	=	status;
	$('txtId').value 		=	id;
	thisForm.txtWhat2Do.value	=	'CHANGESTATUS';
	thisForm.submit();
}

function __fncAddAddition(){
	thisForm.txtWhat2Do.value = 'ADDNEW';
	thisForm.submit();
}

function __fncCheckSaveAdditoin(id){
	if(trim($('txtTitle').value) == ''){
		$('txtTitle').className	=	'inputTextRed';
		$('tdTitle').className	=	'inputLabelRed';
		$('txtTitle').focus();
		return false;
	}else{
		$('txtTitle').className	=	'inputText';
		$('tdTitle').className	=	'';
	}
	if(id != ''){
		thisForm.txtWhat2Do.value = 'UPDATE';
		thisForm.txtId.value = id;
	}else{
		thisForm.txtWhat2Do.value = 'SAVE';
	}
	thisForm.submit();
}

function __fncUpdatePlanDetails(){
	thisForm.txtWhat2Do.value = 'UPDATEPLANDETAILS';
	thisForm.submit();
}

function __fncCheckSavePlanChars(id){
	if(trim($('txtTitle').value) == ''){
		$('txtTitle').className	=	'inputTextRed';
		$('tdTitle').className	=	'inputLabelRed';
		$('txtTitle').focus();
		return false;
	}else{
		$('txtTitle').className	=	'inputText';
		$('tdTitle').className	=	'';
	}
	
	if($('cboGroup').value == '0'){
		$('cboGroup').className	=	'inputComboRed';
		$('tdGroup').className		=	'inputLabelRed';
		$('cboGroup').focus();
		return false;
	}else{
		$('cboGroup').className	=	'inputCombo';
		$('tdGroup').className		=	'';
	}
	if(id){
		thisForm.txtId.value		=	id;
		thisForm.txtWhat2Do.value 	=	'UPDATE';
	}else{
		thisForm.txtWhat2Do.value 	=	'SAVE';
	}
	thisForm.submit();
}

function __fncGo(){
	thisForm.submit();
}

function __fncTextboxReadonly(chkId, txtId){
	if($(chkId).checked == true){
		$(txtId).value		=	"";
		$(txtId).readOnly	=	"readonly";
	}else{
		$(txtId).readOnly="";
	}
}


function __fncShowHideJogosDiv(divId){
	if($(divId).style.display	==	'none'){
		$(divId).style.display	=	'block';
	}else{
		$(divId).style.display	=	'none';
	}
}

function __fncCheckSaveRequirments(id){
	if(trim($('txtTitle').value) == ''){
		$('txtTitle').className	=	'inputTextRed';
		$('tdTitle').className	=	'inputLabelRed';
		$('txtTitle').focus();
		return false;
	}else{
		$('txtTitle').className	=	'inputText';
		$('tdTitle').className	=	'';
	}
	if(id){
		thisForm.txtId.value		=	id;
		thisForm.txtWhat2Do.value 	=	'UPDATE';
	}else{
		thisForm.txtWhat2Do.value 	=	'SAVE';
	}
	thisForm.submit();
}

function __fncCheckSaveLinks(){
	if(trim($('txtTutorials').value) == ''){
		$('txtTutorials').className	=	'inputTextRed';
		$('tdTutorials').className	=	'inputLabelRed';
		$('txtTutorials').focus();
		return false;
	}else{
		$('txtTutorials').className	=	'inputText';
		$('tdTutorials').className	=	'';
	}
	
	if(trim($('txtFaq').value) == ''){
		$('txtFaq').className	=	'inputTextRed';
		$('tdFaq').className	=	'inputLabelRed';
		$('txtFaq').focus();
		return false;
	}else{
		$('txtFaq').className	=	'inputText';
		$('tdFaq').className	=	'';
	}
	
	if(trim($('txtMsnLink').value) == ''){
		$('txtMsnLink').className	=	'inputTextRed';
		$('tdMsnLink').className	=	'inputLabelRed';
		$('txtMsnLink').focus();
		return false;
	}else{
		$('txtMsnLink').className	=	'inputText';
		$('tdMsnLink').className	=	'';
	}
	
	if(trim($('txtMail').value) == ''){
		$('txtMail').className	=	'inputTextRed';
		$('tdMail').className	=	'inputLabelRed';
		$('txtMail').focus();
		return false;
	}else{
		$('txtMail').className	=	'inputText';
		$('tdMail').className	=	'';
	}
	thisForm.txtWhat2Do.value = 'UPDATE';
	thisForm.submit();
}




