
function showpic(pic,titel,w,h,ordner) {
 window.open(ordner+'../include/pic_show.php?pic='+pic+'&titel='+titel,'', 'width='+w+',height='+h+',left='+(screen.width-w)/2+',top='+(screen.height-h)/2+',toolbar=no,menubar=no,scrollbars=no,resizable=yes');
}


// Voting ------------- frames/voting.php
// Schritt-Clicks
function submit_step(form,step,typ) {
 document.forms[form].elements["step"].value = step;
 document.forms[form].elements["typ"].value = typ;
 document.forms[form].submit();
}


// Band selektieren
function band_select(typ,band_id,band_name) {

 // Reservierte Felder auswerten
 var band_id_1,band_id_2,band_id_3;
 band_id_1 = document.forms["form_voting"].elements["vote_band_id["+typ+"][1]"].value;
 band_id_2 = document.forms["form_voting"].elements["vote_band_id["+typ+"][2]"].value;
 band_id_3 = document.forms["form_voting"].elements["vote_band_id["+typ+"][3]"].value;

 scrollTo (0,0);

 if (!band_id_1 && (band_id != band_id_2 && band_id != band_id_3)) {
  document.forms["form_voting"].elements["vote_band_name["+typ+"][1]"].value = band_name;
  document.forms["form_voting"].elements["vote_band_id["+typ+"][1]"].value = band_id;
  select_effect(typ,1,band_name,200);
 } else if (!band_id_2 && (band_id != band_id_1 && band_id != band_id_3)) {
  document.forms["form_voting"].elements["vote_band_name["+typ+"][2]"].value = band_name;
  document.forms["form_voting"].elements["vote_band_id["+typ+"][2]"].value = band_id;
  select_effect(typ,2,band_name,200);
 } else if (band_id != band_id_1 && band_id != band_id_2) {
  document.forms["form_voting"].elements["vote_band_name["+typ+"][3]"].value = band_name;
  document.forms["form_voting"].elements["vote_band_id["+typ+"][3]"].value = band_id;
  select_effect(typ,3,band_name,200);
 }

} // Band selektieren


// Effekt beim selektieren
function select_effect(typ,x,band_name,font_size) {
 document.getElementById("show_band["+typ+"]["+x+"]").innerHTML = "<font style=\"font-size:"+font_size+"%\">" + band_name + "</font>";
 font_size -= 10;
 if (font_size >= 100) setTimeout("select_effect("+typ+","+x+",'"+band_name+"',"+font_size+")",10);
} // Effekt



function band_deselect(typ,x,alle) {

 document.getElementById("show_band["+typ+"]["+x+"]").innerHTML = "";
 document.forms["form_voting"].elements["vote_band_name["+typ+"]["+x+"]"].value = "";
 document.forms["form_voting"].elements["vote_band_id["+typ+"]["+x+"]"].value = "";

 // Falls man beim VOTE Step alle Bands haendisch entfernt, soll der Vote Button deselected werden!
 var submit_sperre = true;
 for (var i = 1; i <= alle; i++) {
  for (var j = 1; j <= 3; j++) {
   if (document.forms["form_voting"].elements["vote_band_id["+i+"]["+j+"]"].value) submit_sperre = false;
  }
 }
 if (submit_sperre && typeof document.forms["form_voting"].elements["submit_vote"] != "undefined") {
  document.forms["form_voting"].elements["submit_vote"].disabled = true;
  document.getElementById("vote_text").innerHTML = "Bitte einen Künstler voten!";
 }
 // ------------

} // Band deselektieren

function band_select_reset(alle,voted) {
 for (var i = 1; i <= alle; i++) {
  for (var j = 1; j <= 3; j++) {
   if (document.getElementById("show_band["+i+"]["+j+"]") != null) document.getElementById("show_band["+i+"]["+j+"]").innerHTML = "";
   document.forms["form_voting"].elements["vote_band_name["+i+"]["+j+"]"].value = "";
   document.forms["form_voting"].elements["vote_band_id["+i+"]["+j+"]"].value = "";
  }
 }


 // Wenn beim VOTE Step alle Kuenstler entfernt werden muss der Button deselected werden!
 if (typeof document.forms["form_voting"].elements["submit_vote"] != "undefined" && !voted) {
  document.forms["form_voting"].elements["submit_vote"].disabled = true;
  document.getElementById("vote_text").innerHTML = "Bitte einen Künstler voten!";
 }

}


// Voting functions Ende ----------------
