<!--	
var xmlhttp

function popup(href, windowname, w, h){
    if (! window.focus)return true;
    window.open(href, windowname, 'width='+w+',height='+h+',scrollbars=yes');
    return false;
}


function incrementCounter(type, recID){
    xmlhttp=GetXmlHttpObject();
    if (xmlhttp==null){
      alert ("Your browser does not support XMLHTTP!");
      return;
    }
    
    // we are coming from The 'empty' posting page so no increment counter available
    if (recID == -1) return;

    var url = "mPage.php";
    url += "?type="+type+"&id="+recID+"&cf=js";
    url += "&pName=incCntr";
    url += "&sid="+Math.random();
//    alert (url);
    xmlhttp.onreadystatechange=stateChanged;
    xmlhttp.open("GET",url,true);
    xmlhttp.send(null);
}

function stateChanged(){
    if (xmlhttp.readyState == 4) {
//        alert (xmlhttp.responseText);
        var replyTxt = new Array();
        replyTxt = xmlhttp.responseText.split('<|>');

        if (replyTxt[0] == 'P'){
//              format number as phone 
//            var str = replyTxt[1];
//            var res = '(' + str.substr(0,3) + ') ' + str.substr(3,3) + '-' + str.substr(6);
//            $('#phoneLink').html(res);
            $('#phoneLink').html(replyTxt[1]);
            $('#Vphone').html(replyTxt[2]);
        }

        if (replyTxt[0] == 'W'){
            $('#webLink').html(replyTxt[1]);
            $('#Vweb').html(replyTxt[2]);
        }

        //open("http://www.viatelelink.com");
        //location.replace("http://www.viatelelink.com");
        //navigate("http://www.viatelelink.com");

        //document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
        //document.getElementById("phoneLink").className = "controlPhoneHide";
        //document.getElementById("phoneNumber").className = "controlPhoneShow";
  }

}


function GetXmlHttpObject(){
    if (window.XMLHttpRequest){
      // code for IE7+, Firefox, Chrome, Opera, Safari
      return new XMLHttpRequest();
    }
    if (window.ActiveXObject){
      // code for IE6, IE5
      return new ActiveXObject("Microsoft.XMLHTTP");
    }
    return null;
}

//-->
