var ie4 = document.all;
var ns4 = document.layers;
var ns6 = document.getElementById && !document.all;

function findObj(theObj, theDoc)
{
  var p, i, foundObj;
  if(!theDoc) theDoc = document;
  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  {
    theDoc = parent.frames[theObj.substring(p+1)].document;
    theObj = theObj.substring(0,p);
  }
  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  for (i=0; !foundObj && i < theDoc.forms.length; i++) 
    foundObj = theDoc.forms[i][theObj];
  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
    foundObj = findObj(theObj,theDoc.layers[i].document);
  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  return foundObj;
}


   var arrTemp=self.location.href.split("?"); 

   var picUrl = (arrTemp.length>0)?arrTemp[1]:""; 

   var NS = (navigator.appName=="Netscape")?true:false; 

var ti=0;
function popupwin(url, picwidth, picheight, description,resizable,doscrollbars)
{
   ti++;
   var bigpicWin = null;
   usrwidth = screen.width;
   usrheight = screen.height;
   winwidth = picwidth;
   winheight = picheight;

   var X = (usrwidth - winwidth) / 2;
   var Y = (usrheight - winheight) / 2;

   properties = "toolbar=no,location="+url+",directories=no,status=no,scrollbars="+doscrollbars+",resizable="+resizable+",copyhistory=no,width="+picwidth+",height="+picheight+",";

   checkie = navigator.appName.indexOf("icrosoft");
   if (checkie == -1)
   {
      properties = properties+"screenX="+X+",screenY="+Y;
   } else {
      properties = properties+"left="+X+",top="+Y;
   }

   bigpicWin = window.open(url,'bigpicWin'+ti,properties);
   bigpicWin.focus();
}

function dovideo(url)
{
	popupwin(url,640,450,'Video','no','no');
}

function domerchspec(id,lang)
{
	popupwin('../merch/'+id+'-'+lang+'.html',600,270,':: 4XtremeTime Skydiving Center ::','no','no');
}


function gopicture(url)
{
	popupwin('../embed/'+url+'.html',1024,800,':: 4XtremeTime Skydiving Center ::','no','no');
}


function go_picture(url)
{
	popupwin('../gallery/popup.html?id='+url,1024,800,':: 4XtremeTime Skydiving Center ::','no','no');
}

function go_movie(yoid)
{
	popupwin('../gallery/movie.html?id='+yoid,425,375,':: 4XtremeTime Skydiving Center ::','no','no');
}

function go_newsletter(lang)
{
	popupwin('../newsletter/?lang='+lang,250,120,':: 4XtremeTime Skydiving Center ::','no','no');
}

