/**************************************************************************
 * Common
 **************************************************************************/


function ChangeImage(obj, imgtype){
	obj.src = "http://craze-as.heteml.jp/craze/a/images/"+ obj.id + imgtype + ".jpg";
}

function seltab(bpref, hpref, id_max, selected) {
  if (! document.getElementById) return;
  for (i = 0; i <= id_max; i++) {
    if (! document.getElementById(bpref + i)) continue;
    if (i == selected) {
      document.getElementById(bpref + i).style.visibility = "visible";
      document.getElementById(bpref + i).style.position = "";
      document.getElementById(hpref + i).className = "open";
      document.getElementById("seltab" + i).src = "http://craze-as.com/wp/images/seltab/seltab" + i + "a.jpg";      
    } else {
      document.getElementById(bpref + i).style.visibility = "hidden";
      document.getElementById(bpref + i).style.position = "absolute";
      document.getElementById(hpref + i).className = "close";
      document.getElementById("seltab" + i).src = "http://craze-as.com/wp/images/seltab/seltab" + i + "b.jpg";
    }
  }
}

function winClose() {
	window.close();
}

function winOpen(url,w,h) {
	var win = window.open(url , "newwindow" , "width=" + w + ",height=" + h + ", menubar=no, toolbar=no, scrollbars=yes");
	win.focus();
}
