/*
// author: Sebastian Waschik
// last changed: 2004/11/11
*/



function detectSite(){
//	if (top!=self)
//		top.location=self.location;

//	if (top.location.host == "somesite.co.uk"){
//	       self.location.replace("http://123.123.123.123/somesite");
//	}else{
//	       alert("I don't know where I am");
//	}
}


function getImageBase(src) {
  index = src.lastIndexOf(".") - 1;
  if(index < 0) {
    return "";
  } else {
     if( src.substr(index, 1) == "1") {
       index--;
       if (index < 0) {
         return "";
       }
     }
     return src.substr(0,index + 1);
  }
}


function preLoadImage(image) {
  var i = new Image();
  i.src=image;
}


function preLoadImages() {
  var args = preLoadImages.arguments;
  if (document.images) {
    for (var i = 0; i < args.length; i++) {
      preLoadImage(getImageBase(document.images[args[i]].src));
    }
  }
}


function preLoadGifImages() {
  var args = preLoadImages.arguments;
  if (document.images) {
    for (var i = 0; i < args.length; i++) {
      preLoadImage(getImageBase(document.images[args[i]].src) + "1.gif");
    }
  }
}


function doClick(name) {
  if(document.images) {
    document.images[name].src=getImageBase(document.images[name].src) + "1.gif";
  }
  return true;
}


function doMouseOver(name) {
  if(document.images) {
    document.images[name].src=getImageBase(document.images[name].src) + "1.gif";
  }
  //window.status=document.images[name].alt;
  return true;
}


function doMouseOut(name) {
  if(document.images) {
    document.images[name].src=getImageBase(document.images[name].src) + ".gif";
  }
  //window.status="";
  return true;
}


function gotoSelect(select) {
  var URL = select.options[select.options.selectedIndex].value;
  if (URL != "#") {
    top.window.location.href = URL;
  }
  select.options.selectedIndex = 0;
  select.blur();
}


function changeFrame(frame, url) {
    parent.frames[frame].location.href = url;
}


/*
function openPopup(ppage, pname, ptoolbar, presizible, pscrollbars, pwidth, pheight, ptop, pleft, ) {
	popupWin = window.open(ppage, pname, "toolbar=" + ptoolbar + ",resizable="+ presizible + ",scrollbars=" + pscrollbars + ",width=" + pwidth + ",height=" + pheight + ",top=" + ptop + ",left=" + pleft)
}
*/


function doLoad() {
  return true;
}


function doBegin() {
  return true;
}


function doEnd() {
  return true;
}

