ppos = 0;
function moveimage()
{
	var im = document.getElementById('panimg');
	
	ppos -= 1;
	if (ppos < -(im.width/2))
		ppos += (im.width/2);
	im.style["left"] = ppos + 'px';
}

pullDowns = new Object();
pullDowns.name = "pullDowns";
pullDowns.transparent = false;

flyouts = Array( pullDowns );

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 externalLinks() {
 setInterval(moveimage,60);  // Needed for the panorama
 
	for ( id in flyouts ) {
		props = flyouts[id];
		layerObject = MM_findObj( props.name );
		IErepair( layerObject );
	}
 
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
	   anchor.getAttribute("rel") == "external") {
		   anchor.onclick = doPopup;
   }
 }
}
window.onload = externalLinks;
newWindow = null;

function doPopup(e) {
	if (newWindow!=null) newWindow.close();
	
	newWindow  = window.open( this.href, 'newWin', "resizable,toolbar=no, location=no,scrollbars=yes,left=0,top=0" );
	newWindow.focus();
	return false;
}
