function doPhoneLink(suffix,bcat){
if(showObject('phoneVal'+suffix)){
		hideObject('phoneLink'+suffix);
		showObject('phoneLabel'+suffix,suffix,bcat);
	}
}

function RecEmail(suffix,bcat){
	document.all['myiframe'].innerHTML="<iframe src='recordemail.asp?MerchantID=" + suffix + "&bcat=" + bcat + "' height=1 width=1></iframe>";
}

function getObject(objID){
   if (document.all){
      var obj = document.all[objID];
   }
   else if (document.getElementById){
      var obj = document.getElementById(objID);
   }
 return obj;
}

function hideObject(objID){
	var obj = getObject(objID);
	var rtn = false;
	if (obj != null) {
     	obj.style.display = "none";
		rtn = true;
	}
  return rtn;
}

function showObject(objID,merid,bcat){
	var obj = getObject(objID);
	var rtn = false;
	if (obj != null) {
		  document.all['myiframe'].innerHTML="<iframe src='recordphone.asp?MerchantID=" + merid + "&bcat=" + bcat + "' height=1 width=1></iframe>";
     	  obj.style.display = "inline";
		  obj.style.position = "static";
		  obj.style.width = "auto";
		  obj.style.height = "auto";
		  obj.style.overflow = "visible";
		rtn = true;
	}
	return rtn;
}
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}
