
  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];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function printPage() {
  if (window.print)
    window.print()
  else
    alert("Sorry, your browser doesn't support this feature. Close this dialogue box and use File>Print (Mac) or right-click on the page, then select 'print'. (PC)");
}

var showMsg = navigator.userAgent != "Mozilla/4.0 (compatible; MSIE 4.0; Mac_PowerPC)";
function dmim(msgStr) {
  document.returnValue = false;
  if (showMsg) { 
    window.status = msgStr;
    document.returnValue = true;
  }
}
 function SS_confirm(msg,url) { //v1.0
  if(confirm(msg)) {
  	parent.location=url;
  	
  }
}
function SetChecked(val) {
	dml=document.cart;
	len = dml.elements.length;
	var i=0;
	for( i=0 ; i<len ; i++) {
		if (dml.elements[i].name=='removeList') {
			dml.elements[i].checked=val;
		}
	}
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

/*images to be preloaded go here*/

var preloader = new Array();
	preloader[0] = new Image();
	preloader[0].src = "/images/layout/left-nav-down.gif";
	preloader[1] = new Image();
	preloader[1].src = "/images/layout/left-nav-right.gif";


/* Function for IE6 to be used where needed */
function RemoveUnits( txt )
{
    var temp = txt.replace(/px|cm|pt|em|en|auto/,'');

    return isNaN(temp) ? 0 : parseInt( temp );
}

/*ie6 does not support the min and max width css properties, so a javascript workaround needs to be implemented if we need that*/
function IE6MinWidth( el, size )
{
    var max = (this.IE6MaxWidth ? this.IE6MaxWidth : this.IE6MaxWidth = RemoveUnits(el.currentStyle.paddingLeft) + RemoveUnits(el.currentStyle.marginLeft) + RemoveUnits(el.currentStyle.borderLeftWidth) + size + 1);

    if (document.documentElement.clientWidth > max) 
    {
        return 90+"%";

        
    } 
    else 
    { 
        return size+"px";
        
    }
}

/*var BoxHeights = {
	maxh: 0,
	boxes: Array(),
	num: 0,
	equalise: function() {
		this.num = arguments.length;
		for (var i=0;i<this.num;i++) if (!$(arguments[i])) return;
		this.boxes = arguments;
		this.maxheight();
		for (var i=0;i<this.num;i++) $(arguments[i]).style.height = this.maxh+"px";
	},
	maxheight: function() {
		var heights = new Array();
		for (var i=0;i<this.num;i++) {
			if (navigator.userAgent.toLowerCase().indexOf('opera') == -1) {
				heights.push($(this.boxes[i]).scrollHeight);
			} else {
				heights.push($(this.boxes[i]).offsetHeight);
			}
		}
		heights.sort(this.sortNumeric);
		this.maxh = heights[this.num-1];
	},
	sortNumeric: function(f,s) {
		return f-s;
	}
}

window.onload = function() {
	BoxHeights.equalise('nav','contenttable');
}*/


function isExternalLink() {
/* UNCOMMENT WHEN HAVE NEW VERSION
	for (i=0; i < document.links.length; i++) {
	 if (document.links[i].href.indexOf("gbn.stsolo.com") == -1 && document.links[i].href.indexOf("javascript") == -1) {
		outsidelink = function(siteurl){
			if (confirm("You are about to leave the Golden Band Resources Inc. Web site.\Golden Band Resources Inc. is not responsible for the content of external sites.\n\nYou may need to modify your popup blocker to display external sites.")){return true;} else {return false;}}
			if (document.all) {
					document.links[i].attachEvent("onclick",outsidelink);
			}
			else if (document.getElementById) {
					document.links[i].setAttribute('onclick','return outsidelink();');
			}
   		 }
	} 
*/
}

