// JScript File
function GetHTTPObject()
	{
		var httpObject;
		/*@cc_on
		@if (@_jscript_version >= 5)
			try
			{
				httpObject = new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
				try
				{
					httpObject = new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch (e2)
				{
					httpObject = false;
				}
			}
		@else
		httpObject = false;
		@end @*/
		if (!httpObject && typeof XMLHttpRequest != 'undefined')
		{
		  try
		  {
		    httpObject = new XMLHttpRequest();
		  }
		  catch (e)
		  {
		    httpObject = false;
		  }
		}
		return httpObject;
	}

function ExternalPopup(url, title)
{
  window.open(url, title,'width=800,height=600,scrollbars=yes,resizable=1');
}

function Show(elementID, show)
{
  var element = document.getElementById(elementID);
  if (show)
    element.style.display = "";
  else
    element.style.display = "none";
}

function IndexOf(arr, value)
{
  for (var idx = 0; idx < arr.length; ++idx)
  {
    if (arr[idx] == value)
      return idx;
  }
  return -1;  
}

function ArrayDelete(arr, idx)
{
  var result = new Array();
  for (var nr = 0; nr < arr.length; ++nr);
  {
    if (idx != nr)
      result.push(arr[nr]);
  }
  return result;
}

function ShowHide(id)
{
    var element = document.getElementById(id);
    if(element.className == "hidden")
    {
        element.className = "visible";
    }
    else
    {
        element.className = "hidden";
    }
}

function SubmitOnReturn(evt, uniqueID)
{
 if (evt.keyCode ==  13)
 {
   
       WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(uniqueID, "", true, "", "", false, true));
 }
}
//function Banner(tag, zoneid)
//{
////kann nicht zweimal aufgerufen werden
////
////    var m3_u = (location.protocol=='https:'?'https://adserver.complexx.com/www/delivery/ajs.php':'http://adserver.complexx.com/www/delivery/ajs.php');
////    var m3_r = Math.floor(Math.random()*99999999999);
////    if (!document.MAX_used) document.MAX_used = ',';
////    document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
////    document.write ("?zoneid="+zoneid+"&amp;source="+tag+"&amp;target=_blank&amp;block=1&amp;blockcampaign=1");
////    document.write ('&amp;cb=' + m3_r);
////    if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
////    document.write ("&amp;loc=" + escape(window.location));
////    if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
////    if (document.context) document.write ("&context=" + escape(document.context));
////    if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
////    document.write ("'><\/scr"+"ipt>");

//   document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
//   document.write ("http://adserver.complexx.com/adjs.php?");
//   document.write ("what=zone:"+zoneid+"&amp;source="+tag+"&amp;target=_new&amp;blockcampaign=1");
//   document.write ("'><" + "/script>");


//}

//function BannerTop(tag)
//{
//    Banner(tag, 55);
//}

//function BannerSky(tag)
//{
//    Banner(tag, 57);
//}
////check?
//function BannerToolbox(tag)
//{
//    Banner(tag, 58);
//}

var OA_p=location.protocol=='https:'?'https:':'http:';
var OA_r=Math.floor(Math.random()*99999999);
if (!document.OA_used) document.OA_used = ',';
function OA_adjs(z,n)
{
  if (z>-1) {
    var az="<"+"script language='JavaScript' type='text/javascript' ";
    az+="src='"+OA_p+"//adserver.complexx.com/www/delivery/ajs.php?n="+n+"&zoneid="+z;
    az+="&source="+OA_channel+"&exclude="+document.OA_used+"&r="+OA_r;
    az+="&mmm_fo="+(document.mmm_fo)?'1':'0';
    if (document.context) az+= "&context=" + escape(document.context);
    if (window.location) az+="&loc="+escape(window.location);
    if (document.referrer) az+="&referer="+escape(document.referrer);
    az+="'><"+"/script>";
    document.write(az);
  }
}


 $(document).ready(function(){          
    $("select.countryDropdown").hide();
    $("div.countryButton").show();

    $("div.countryButton").mouseover(function(){
        if (jQuery.browser.msie && jQuery.browser.version == 6)
        {
            $("div.countryPanel").show();
        }
        $("div.countryPanel").fadeIn("slow");       
    });
    
     $("span.countrySelected").mouseover(function(){
        if (jQuery.browser.msie && jQuery.browser.version == 6)
        {
            $("div.countryPanel").show();
        }
        $("div.countryPanel").fadeIn("slow");       
    });

//    $("div#countrySelect a").click(function(){       
//        if (jQuery.browser.msie && jQuery.browser.version == 6)
//        {
//            $("div.countryPanel").hide();
//        }
//        $("div.countryPanel").fadeOut("slow");
//    });   
//    
//    $("div.countryButton").click(function(){
//        if (jQuery.browser.msie && jQuery.browser.version == 6)
//        {
//            $("div.countryPanel").hide();
//        }
//        $("div.countryPanel").fadeOut("slow");
//    });   

      $("body").click(function(){
        if (jQuery.browser.msie && jQuery.browser.version == 6)
        {
            $("div.countryPanel").hide();
        }
        $("div.countryPanel").fadeOut("slow");
    });   
    
             	            
});