
function showHintCountry(landid)
{
    if (landid != 8)
    {
        document.getElementById("HintCountry").style.display = "block";
        document.getElementById("HintCountryEmpty").style.display = "none";
    }
    else
    {
        document.getElementById("HintCountry").style.display = "none";
        document.getElementById("HintCountryEmpty").style.display = "block";
    }
}

    function checkall() {

        for(var x=0;x<document.forms[1].elements.length;x++) {

            var y=document.forms[1].elements[x];
            if(y.name!="allmsgs") y.checked=document.forms[1].allmsgs.checked;
        }
    }

    function leftchar(objekt) {

	var maximumLength = 159;

	if (objekt.value.length > maximumLength) {

	    document.sms.counter.select();
	    objekt.value = objekt.value.substring(0,159);
      	    left = 0;
	    document.sms.counter.focus();
    	}
	else
	{
      	    left = maximumLength - objekt.value.length;
    	}

    	document.sms.counter.value = left;
    }

    function rechnungen(perid) {

	window.open('http://www2.hostix.de/rechnungen/index.php?perid=' + perid,'Rechnungen','width=800,height=600,scrollbars=no,resizable=yes');
    }

    function nofunct()
    {
    }

function openPop(url, name, w, h, optScroll)
{
    w = (w > screen.availWidth) ? (screen.availWidth - 32) : w;
    h = (h > screen.availHeight) ? (screen.availHeight - 64) : h;

    var myX = (screen.availWidth - w) / 2;
    var myY = (screen.availHeight - h) / 2;
    var opt = (openPop.arguments.length == 5 && optScroll == "noscroll") ? ",scrollbars=no" : ",scrollbars=yes";

    window.open(url, name, "width=" + w + ",height=" + h + ",left=" + myX + ",top=" + myY + ",resizable=yes" + opt);
}

function externalLinks()
{
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++)
 {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external nofollow")
     anchor.target = "_blank";
 }
}

