function showEnlarged(prefix, picUrl) 
{
	window.open(prefix+"display-popup.php?"+picUrl, "poppis", "resizable=1,HEIGHT=300,WIDTH=300,Left=20%,Top=20%");
}

function openTerms() 
{
	window.open("terms.php", "pops", "scrollbars=1,resizable=1,HEIGHT=500,WIDTH=680,Left=20%,Top=20%");
}

function bookmarkUs(title, url)
{
  if (document.all) 
	  window.external.AddFavorite(title, url, "")
  else if (window.sidebar) 
	  window.sidebar.addPanel(title, url, "");
}

function validateContact()
{
	fv = new formValidator();
	
	if (fv.isEmpty("your_name"))
		fv.raiseError("Please specify your name.");
		
	if (fv.isEmpty("your_company"))
		fv.raiseError("Please specify your company name.");
		
	if (fv.isEmpty("your_number"))
		fv.raiseError("Please specify your phone number.");
	
	if (fv.isEmpty("email"))
		fv.raiseError("Please specify an email address.");
	else
	{
		if (!fv.isEmailAddress("email"))
			fv.raiseError("Please specify a valid email address.");
	}
	
	if (fv.isEmpty("comments"))
		fv.raiseError("Please specify a your comments / requirement.");
		
	if (fv.numErrors() > 0)
	{
		fv.displayErrors();
		return false;
	}
	else
		return true;
}

var totalImages = 2; // Total images used

browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);

ns3up = (browserName == "Netscape" && browserVer >= 3);
ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4);

function showPic(imgName) 
{
	if (ns3up || ie4up) 
		imgOn = ("images/showcase/" + imgName);
		
	document.mainpic.src = imgOn;
}

if(document.images)
{
	mFX = new Array(totalImages);
	for(i = 0; i < mFX.length; i++)
	{
		mFX[i] = new Image();
	}
	
	url = 'http://www.mammothsolutions.co.za/';
	//url = 'http://mammoth-server/MAMMOTH/MAMMOTH-SOLUTIONS/';
	
	mFX[0].src = url+"images/showcase/showcase.gif";
	mFX[1].src = url+"images/showcase/showcase-over.gif";
}

function imgFX(img, num)
{
	if(document.images)
	{
		document.images[img].src = mFX[num].src;
	}
}

function MM_preloadImages() 
{ //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}