function newWindow(url, ref, name, width, height) {
	ref = url + ref;
	window.open(ref, name, "width="+width+", height="+height+", status=no, scrollbars=no");
	self.name = 'mainWindow';
}

function openWindow(url, ref, name, width, height) {
	ref = url + ref;
	window.open(ref, name, "width="+width+", height="+height+", status=no, scrollbars=yes");
}

function imageView(url, ref, name, width, height) {
	ref = url + ref;
	window.open(ref, name, "width="+width+", height="+height+", status=no, scrollbars=no");
}

function exchange_src() { 
  str = exchange_src.arguments[0];
  str = (navigator.appName == 'Netscape') ? 'document.' + str : 'document.all.' + str;
  img = eval(str);
  if (img) {
    if (img.ori_src == null) {
      img.ori_src = img.src;
      img.src     = exchange_src.arguments[1];
    } else {
      var temp    = img.src;
      img.src     = img.ori_src;
      img.ori_src = temp;
    }
  } 
}

function preload_img() { 
  var img_list = preload_img.arguments;
  if (document.preloadlist == null) 
    document.preloadlist = new Array();
  var top = document.preloadlist.length;
  for (var i=0; i < img_list.length; i++) {
    document.preloadlist[top+i]     = new Image;
    document.preloadlist[top+i].src = img_list[i];
  } 
}

function select_play(){
   window.open('','relay','toolbar=no,scrollbars=auto,width=468 height=230');
   document.cart.action='/musicbox/musicbox.php3';
   document.cart.target='relay';
   document.cart.method='post';
   document.cart.submit();
}
