

function open_img(s_showcase,s_location,s_Desc)
{
	window.open('popup.asp?showcase=' + escape(s_showcase)+'&filelocation=' + escape(s_location)+'&Desc='+escape(s_Desc),'','scrollbars=yes,resizable=yes,width=640,height=450');
}	

/*	
function open_content_img(s_showcase)
{
	window.open('popup.asp?showcase=' + escape(s_showcase)+'&filelocation=' + escape('')+'&Desc=','','scrollbars=yes,resizable=yes,width=640,height=450');	
}
*/


function open_content_img(objImage)
{
	var anchor1 = $("#tempa");
	var imagesrc = "http://www.prodive.co.za"+objImage.replace('_cmsthumb','');
	anchor1.attr('href',imagesrc);
	anchor1.attr('rel','contentimage');	
	anchor1.attr('title','');	
	anchor1.fancybox({'titlePosition'	: 'inside'});	
	anchor1.trigger('click');
	return false	
}

function doSearchVal(obj)
{
	if(obj.searchbox.value.length < 3)
	{
		alert('Please enter at least three characters.');
		obj.searchbox.focus();
		return false;
	}
	return true;	
}

function realy_load_file_doc(varFileName)
{
	// this one does the actual loading ...
	window.open('Uploads/'+String(varFileName), '_blank');
}




function trimAll(sString) 
{
	while (sString.substring(0,1) == ' ')
	{
	sString = sString.substring(1, sString.length);
	}
	while (sString.substring(sString.length-1, sString.length) == ' ')
	{
	sString = sString.substring(0,sString.length-1);
	}
return sString;
}



