function __fncEdit(id){
	thisForm.txtWhat2Do.value = 'EDIT';
	thisForm.txtId.value = id;
	thisForm.submit();
}

function __fncCheckSaveAdditoin(id){
	
	if(id != ''){
		thisForm.txtWhat2Do.value = 'UPDATE';
		thisForm.txtId.value = id;
	}
	thisForm.submit();
}

function __fncEditPlan(id){

	if(id){
		thisForm.txtWhat2Do.value = 'EDIT';
		thisForm.txtId.value = id;
		thisForm.submit();
	}else{
		thisForm.txtWhat2Do.value = 'ADD';
		thisForm.submit();
	}
}

function __fncCheckSaveAdditoinPlan(id){
	
	if(trim($('txtTitle').value) == ''){
		$('txtTitle').className	=	'inputTextRed';
		$('tdTitle').className	=	'inputLabelRed';
		$('txtTitle').focus();
		return false;
	}else{
		$('txtTitle').className	=	'inputText';
		$('tdTitle').className	=	'';
	}
	
//	if(trim($('txtPricing').value) == ''){
//		$('txtPricing').className	=	'inputTextRed';
//		$('tdPricing').className	=	'inputLabelRed';
//		$('txtPricing').focus();
//		return false;
//	}else{
//		$('txtPricing').className	=	'inputText';
//		$('tdPricing').className	=	'';
//	}
	
	if(trim($('txtProcessor').value) == ''){
		$('txtProcessor').className	=	'inputTextRed';
		$('tdProcessor').className	=	'inputLabelRed';
		$('txtProcessor').focus();
		return false;
	}else{
		$('txtProcessor').className	=	'inputText';
		$('tdProcessor').className	=	'';
	}
	
	if(trim($('txtDisplayOrder').value) != ''){
		if(isNaN($('txtDisplayOrder').value)){
			
			$('txtDisplayOrder').className	=	'inputTextRed';
			$('txtDisplayOrder').className	=	'inputLabelRed';
			$('txtDisplayOrder').focus();
			alert("Display Order Should be a number");
			return false;
		}
		else{
			$('txtDisplayOrder').className	=	'inputText';
			$('txtDisplayOrder').className	=	'';
		}
	}
	
	if(id != ''){
		thisForm.txtWhat2Do.value = 'UPDATE';
		thisForm.txtId.value = id;
	}else{
		thisForm.txtWhat2Do.value = 'SAVE';
	}
	thisForm.submit();
}

function __fncCheckSaveCloudOffer(){
	if (trim($('txtImageLink').value) != '' && !isValidURL($('txtImageLink').value)){
		$('txtImageLink').className	=	'inputTextRed';
		$('txtImageLink').focus();
		alert("Please Enter a Valid URL Link");
		return false;
	}
	thisForm.txtWhat2Do.value = 'UPDATE';
	thisForm.submit();
}

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


function __fncShowHideHospedagemDiv(divId){
	if($(divId).style.display	==	'none'){
		for(var i = 1; i <= 5; i++){
			div = 'div'+i;
			$(div).style.display	=	'none';
		}
		$(divId).style.display	=	'block';
	}else{
		$(divId).style.display	=	'none';
	}
}
function changeLanguage(lng)
{	
	thisForm.language.value	= lng;
	thisForm.action 		= "language.php";	
	thisForm.submit();
}
function ResetSession()
{
	thisForm.action 		= "language.php";	
	thisForm.submit();
}

function __fncShowPaymentData(divID){ 	
		document.getElementById(divID).style.display	='block'; 	
}function __fncHidePaymentData(divID){ 	
		document.getElementById(divID).style.display	='none'; 
}
function __fncSetSelectedPaymentValue(id, value, os){
	var val = document.getElementById(id).innerHTML;
	document.getElementById('txtPaymentType').value = val;
	document.getElementById('PaymentDiv').style.display	='none'; 
	document.getElementById('hidId').value = value;
	var postStr	=	'';
	postStr	+=	'id='+os+'&hidId='+value+'&txtPaymentType='+val;
	
	$('divClouds').innerHTML = '<img src="./Images/ajax-loader2.gif" border="0" style="padding-left:25px;" />';
	general.makePOSTRequestCommon('ajaxposts.php?action=LOADCLOUDTABLE', postStr, 'divClouds');
}

function __fncShowPaymentdiv(id){ 	
	document.getElementById(id).style.background = '#444446';
}
function __fncChangeBGColor(id){
	document.getElementById(id).style.background = '#6D7276';
}
function deleteImage(id){
	if(confirm('Do you really want to delete this image?')){		
		var postStr	=	'';
		postStr	+=	'id='+id;
		general.makePOSTRequestCloud('ajaxposts.php?action=DELETEIMAGE', postStr,'divServerError');
	}
}

function fncCloudComputingFlash(){
	general.makePOSTRequestCommon('ajaxposts.php?action=CLOUDCOMPUTINGFLSHSHOW', '','quicklookpopupajax');
}

function hide_popup()
{
	if($('popcontent').value=='1')
	{
		
		$('quicklookCpanelpopup').onclick();
	}
	
}
