
	subject_id = '';
	function handleHttpResponse() {
		if (http.readyState == 4) {
			if (subject_id != '') {
				$(subject_id).innerHTML = http.responseText;
			}
		}
	}

	function $(id)
	{
	  return document.getElementById(id);
	}


	function getHTTPObject() {
		var xmlhttp;
		/*@cc_on
		@if (@_jscript_version >= 5)
			try {
				xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				try {
					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (E) {
					xmlhttp = false;
				}
			}
		@else
		xmlhttp = false;
		@end @*/
		if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
			try {
				xmlhttp = new XMLHttpRequest();
			} catch (e) {
				xmlhttp = false;
			}
		}
		return xmlhttp;
	}

    function KeyCode(evt)
	{
	  if (!evt)
	  {
	    return event.keyCode;
	  }
	  else
	  {
	    return evt.keyCode;
	  }
	}
    function urlEncode(sStr)
    {
      return escape(sStr)
       .replace(/\+/g, '%2B')
          .replace(/\"/g,'%22')
             .replace(/\'/g, '%27');
    }

    function IsPositiveInt(val)
    {
      var hasPositiveNumber = false;
      for (i = 0; i < val.length; ++i)
      {
        var ch = val.charAt(i);
		if (ch <"0" || ch  > "9")
		  return false;
		else
		  if (ch != "0")
		    hasPositiveNumber = true;
	  }
	  return hasPositiveNumber;
    }

   /* function IntoBasket(page, div_id, auflage_form_id, change_div_id, change_auflage_id)
    {
       subject_id = div_id;


       auflageForm = document.forms[auflage_form_id];
       auflage = GetValue(auflageForm.Auflage);
       if (IsPositiveInt(auflage))
       {
         produkt = auflageForm.Produkt.value;
         $(change_div_id).style.display="block";
         auflageForm.style.display="none";

         $(change_auflage_id).innerHTML = parseInt(auflage);
          http.open("POST", page, true);

         http.onreadystatechange = handleHttpResponse;
         http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
         http.send("Produkt="+ urlEncode(produkt) + "&Auflage=" + urlEncode(auflageForm.Auflage.value));
       }
       else
       {
         alert("Bitte eine positive Zahl eingeben.");
       }
    }
    */


    function SetValue(formElement, value)
    {
        options = formElement.options;
         if (options)
         {
           for (i = 0; i < options.length; ++i)
             if (options[i].value == value)
               options[i].selected = true;
         }
         formElement.value = value;
    }
    function GetValue(formElement)
    {
        options = formElement.options;
         if (options)
         {
           return options[formElement.selectedIndex].value;
         }
         return formElement.value;
    }

	var http = getHTTPObject(); // We create the HTTP Object
