<!--


function confirmSubmit()
{
var agree=confirm("Are you sure you want to delete this?");
if (agree)
        return true ;
else
        return false ;
}




function insertValueQuery() {
    var myQuery = document.ex_form.in_ex;
    var myListBox = document.ex_form.artists;

    if(myListBox.options.length > 0) {
        var chaineAj = "";
        var NbSelect = 0;
        for(var i=0; i<myListBox.options.length; i++) {
            if (myListBox.options[i].selected){
                NbSelect++;
                if (NbSelect > 1)
                    chaineAj += ", ";
                chaineAj += myListBox.options[i].value;
                chaineAj += "\n";
            }
        }

        //IE support
        if (document.selection) {
            myQuery.focus();
            sel = document.selection.createRange();
            sel.text = chaineAj;
            document.ex_form.insert.focus();
        }
        //MOZILLA/NETSCAPE support
        else if (document.ex_form.in_ex.selectionStart || document.ex_form.in_ex.selectionStart == "0") {
            var startPos = document.ex_form.in_ex.selectionStart;
            var endPos = document.ex_form.in_ex.selectionEnd;
            var chaineSql = document.ex_form.in_ex.value;

            myQuery.value = chaineSql.substring(0, startPos) + chaineAj + chaineSql.substring(endPos, chaineSql.length);
        } else {
            myQuery.value += chaineAj;
        }
    }
}


function selectAllOptions(selStr)
{
  var selObj = document.getElementById(selStr);
  for (var i=0; i<selObj.options.length; i++) {
    selObj.options[i].selected = true;
  }
}


var NS4 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) < 5);

function addOption(theSel, theText, theValue)
{

  Old = document.forms['cal'].artists.value;
  New = Old + ', ' + theText;
  if (Old == '') document.forms['cal'].artists.value = theText;
  else document.forms['cal'].artists.value = New;
}

function deleteOption(theSel, theIndex)
{ 
  var selLength = theSel.length;
  if(selLength>0)
  {
    theSel.options[theIndex] = null;
  }
}

function moveOptions(theSelFrom, theSelTo)
{
  
  var selLength = theSelFrom.length;
  var selectedText = new Array();
  var selectedValues = new Array();
  var selectedCount = 0;
  
  var i;
  
  // Find the selected Options in reverse order
  // and delete them from the 'from' Select.
   for(i=selLength-1; i>=0; i--)
  {
    if(theSelFrom.options[i].selected)
    {
      selectedText[selectedCount] = theSelFrom.options[i].text;
      selectedValues[selectedCount] = theSelFrom.options[i].value;
//     deleteOption(theSelFrom, i);
     selectedCount++;
   }
  }
  
  // Add the selected text/values in reverse order.
  // This will add the Options to the 'to' Select
  // in the same order as they were in the 'from' Select.
  for(i=selectedCount-1; i>=0; i--)
  {
    addOption(theSelTo, selectedText[i], selectedValues[i]);
  }
  
  if(NS4) history.go(0);
}




function bild(url,x,y,name) {
win=window.open('','displayWindow','toolbar=no,menubar=no,location=no,scrollbar=no,resizable=no,width='+x+',height='+y+',layerx=0,layery=0,top=100,left=100,alwaysRaised=yes')
win.document.write('<html><head><title>'+name+'</title><link type=text/css href=<? echo $env; ?>style.css rel=stylesheet></head>\n');
win.document.write('<body>\n');
win.document.write('<p align=center>\n');
win.document.write('<img src=<? echo $env; ?>'+url+' border=0><br><a class=weiss href=\"javascript:close()\">shut it!</a></p></body></html>');
win.document.close();
window.opener=null;
}


function uncheck(id) {

box = eval("document.gall.ignore" + id); 
if (box.checked == true) box.checked = false;

}

  function selectWert(sObj) {
    with (sObj) return options[selectedIndex].value;
  }
  
  
  
  
  // globals
var curSelVal = "";
var startPos = 0;
var endPos = 0;

// functions
function storeCurVal(obj, start, end) {
// function not called if IE 4+
  startPos = obj.selectionStart;
endPos = obj.selectionEnd;
curSelVal = document.forms['topic'].text.value;
}

function getSel(tag)
{
 if(document.selection){
   oldString = document.selection.createRange().text;
 if (oldString != "") {
  document.selection.createRange().text = '<' + tag + '>' + oldString + '</' + tag + '>';
 }
    return false;
 } else if(window.getSelection){
 oldString = curSelVal;
 newString = '';
 finalString = '';
 len = curSelVal.length; // length of current string
 if (len > 0 && document.forms['topic'].text.value.length > 0) {
  // get from beginning of string to start position
  firstPart = oldString.substring(0, startPos);
  // get from end of selection to end of total string
  lastPart = oldString.substring(endPos, len);

  // store the new string
  for (i=startPos; i<endPos; i++) {
   newString += oldString[i];
  }
  // surround it with the proper tag
  finalString = '<' + tag + '>' + newString + '</' + tag + '>';

  // rewrite it back into the textarea
  document.forms['topic'].text.value = firstPart + finalString + lastPart;
 } else {
  curSelVal = "";
 }
 } else if(document.getSelection){ // don't know which browser would actually call this
    txt = obj.setSelectionRange(obj.selectionStart, obj.selectionEnd);
 }
 
}

function doNext(elmnt,content){
    if (content.length==elmnt.maxLength){
      next=elmnt.tabIndex
      if (next<document.forms[0].elements.length){
        document.forms[0].elements[next].focus()
    }
  }
}


function checkmail () {
  if (document.nl.email.value) {
 	 if (document.nl.email.value.indexOf("@") == -1) {
 	   alert("This doesn't look like an email address...");
 	   document.nl.email.focus();
 	   return false;
 	 }
 	}
} 	
 	
 	

//-->