	function fncCancel(start,ordercol,ordertype){
		thisForm.action = "portfolio.php?start="+start+"&ordertype="+ordertype+"&ordercol="+ordercol;
		thisForm.submit();	
	}
	function __fncReset(){
		thisForm.reset();	
	}
	function __fncSavePortfolio(action,id,start,ordercol,ordertype){
		if(action =='SAVE'){
			if(trim(thisForm.txtTitle.value)==''){
				alert("Please enter Title");
				thisForm.txtTitle.focus();
				return false;
			}
			if(trim(thisForm.smallImage.value)==''){
				alert("Please enter Small Image");
				thisForm.smallImage.focus();
				return false;
			}
			if(trim(thisForm.largeImage.value)==''){
				alert("Please enter Large Image");
				thisForm.largeImage.focus();
				return false;
			}
			if(trim(thisForm.txtDisplay.value)==''){
				alert("Please enter Display Order");
				thisForm.txtDisplay.focus();
				return false;
			}
		}else if(action =='UPDATE'){
			if(trim(thisForm.txtTitle.value)==''){
				alert("Please enter Title");
				thisForm.txtTitle.focus();
				return false;
			}
			if(trim(thisForm.txtDisplay.value)==''){
				alert("Please enter Display Order");
				thisForm.txtDisplay.focus();
				return false;
			}
		}
		thisForm.txtId.value = id;
		thisForm.txtWhat2Do.value = action;
		thisForm.action = "portfolio.php?start="+start+"&ordertype="+ordertype+"&ordercol="+ordercol;
		thisForm.submit();
		return false;
	}
	
	function __fncPaginate(strStart, strField, strOrder,filter){
		thisForm.action = 'portfolio.php?start='+strStart+'&ordertype='+strOrder+'&ordercol='+strField;
		thisForm.submit();
	}
		
	function __fncAdd(strAction, strId,start,ordercol,ordertype){
		if(strAction=='SAVE'){
			thisForm.txtWhat2Do.value = 'ADDNEW';
		}
		if(strAction=='EDIT'){
			thisForm.txtWhat2Do.value = 'EDIT';
			thisForm.txtId.value = strId;
		}
		thisForm.action = "portfolio.php?start="+start+"&ordertype="+ordertype+"&ordercol="+ordercol;
		thisForm.submit();
	}
	function __fncDelete(strId){
		if(!confirm('Do you really want to delete?')){
		 return;
		}
		thisForm.txtId.value = strId;
		thisForm.txtWhat2Do.value = 'DELETE';
		thisForm.submit();
	}
	/* Function for delete confirmation */
	function __fncDeleteConfirm(id,field){
		thisForm.txtWhat2Do.value = 'DELETESURE';
		getDivByID(field).value = id;
		thisForm.submit();
	}
	
	function __fncDoNotDelete(strStart, strField, strOrder){
		window.location = 'portfolio.php';
	}
	
	function __fncSortByName(field, start, ordertype){
		thisForm.action 	=	"portfolio.php?start="+start+"&ordertype="+ordertype+"&ordercol="+field;
		thisForm.submit();
	}