function goBand(id){
	location.href = "../band05.php?band="+id;
}
function goVenue(id){
	location.href = "../band05.php?venue="+id;
}
function launchGallery(){
	var w = window.open('../gallery/gallery.php','dyn_gallery','width=778,height=443,status=yes,resizable=no');
	w.focus();
}
function doSearch(str){
	var w = window.open("../search05.php?str="+str,"rbSEARCH","width=250,height=250, left="+((screen.width/2)-230)+",top="+((screen.height/2)-95)+",resizable=yes,scrollbars=yes,menubar=no,toolbar=no,status=yes,location=no");
	w.focus();
}
function goSearch(){
	var n = prompt('Enter the text to search for','');
	doSearch(n);
}
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;
}
function doSearch(str){
	var w = window.open("../search.php?str="+str,"rbSEARCH","width=475,height=235, left="+((screen.width/2)-230)+",top="+((screen.height/2)-95)+",resizable=yes,scrollbars=yes,menubar=no,toolbar=no,status=yes,location=no");
	w.focus();
}
function getAlbumDetails(ref){
	var w = window.open('',"cd_detail","width=100,height=100,top=10,left=10,resizable=no,scrollbars=no,menubar=no,toolbar=no,status=yes,location=no");		
	w.document.write('<html><body><form method="POST" action="http://www.amazon.co.uk/exec/obidos/dt/assoc/handle-buy-box='+ref+'" target="_blank" style="margin:0px;" id="'+ref+'"><input type="hidden" name="asin.'+ref+'" value="1"><input type="hidden" name="tag-value" value="rockbeast-21"><input type="hidden" name="tag_value" value="rockbeast-21"><input type="hidden" name="dev-tag-value" value="D1CWF0CBWRRQAK"><input type="hidden" name="submit.add-to-cart"></form><scr'+'i'+'pt language="javascript">document.forms[0].submit();window.close();</scr'+'i'+'pt></body></html>');
//	document.forms[ref].submit();
}
function simpleBtnPreload(){ 
  var args = simpleBtnPreload.arguments;
  document.imageArray = new Array(args.length);
  var j = 0;
  for(var i=0; i<args.length; i++){
    document.imageArray[j] = new Image;
    document.imageArray[j].src = "../images/2005/btns/btn_"+args[i]+".gif";
	j++;
    document.imageArray[j] = new Image;
    document.imageArray[j].src = "../images/2005/btns/btn_"+args[i]+"_f2.gif";
	var img = args[i];
	if(img==selectedBtn){
		document.images["btn_"+args[i]].src = "../images/2005/btns/btn_"+img+"_f3.gif";
	}else{
		document.images["btn_"+args[i]].onmouseover = function(){
			this.src = "images/2005/btns/"+this.name+"_f2.gif";
		}
		document.images["btn_"+args[i]].onmouseout = function(){
			this.src = "images/2005/btns/"+this.name+".gif";
		}
	}
	}
	j++;
    document.imageArray[j] = new Image;
    document.imageArray[j].src = "../images/2005/btns/morephotos_.gif";
}

function goPhoto(id){
	var w = window.open('../gallery/show-photo.php?photoid='+id,'dyn_photo','width=778,height=443,status=yes,resizable=no');
}
function toggleGoogle(){
	toggleLayer("googleSearch","searchSnap");
}
function toggleLogin(){
	toggleLayer("loginArea","loginSnap");
}
function toggleLayer(o1,o2){
	var obj = findObj(o1,document);
	var obj2 = findObj(o2, document);
	if(obj.style.visibility != "hidden"){
		obj.style.visibility = "hidden";
		obj.style.position = "absolute";
		obj2.src = "../images/snap-down.gif";
	}else{
		obj.style.visibility = "visible";
		obj.style.position = "static";
		obj2.src = "../images/snap-up.gif";
	}
}
function reloadPage(){
	location.reload();
}
function goArt(a){
//	alert(a);
	location.href = '../article.php?art='+a;
}
function doRefresh(){
//
}
var newwindow = '';
var article;
function popUp(){
	if(newwindow!=''){ newwindow.close(); }
	newwindow=window.open('../post-comments.php?art='+article,'_postcomment','width=350, height=350,top=100,left=100,resizable=no');
	newwindow.focus();
}
