<!--

function popSurvey() {
}

function was_popSurvey() {
var x = screen.availWidth - 150;
var y = screen.availHeight - 150;
var LeftPosition = (screen.width) ? (screen.width-x)/2 : 0;
var TopPosition = (screen.height) ? (screen.height-y)/2 : 0;
var settings = 'height='+y+',width='+x+',top='+TopPosition+',left='+LeftPosition+',scrollbars=1,status=0,resizable=1'
var win = window.open('/sitesurvey/','AZDOCSurvey',settings)
}

var winman = null;

function doWindowManagement() 
{
    var npid = document.rptform.npid.value;
    var ngid = document.rptform.ngid.value;
    var anTid = document.rptform.anTid.value;
    var spage = window.location.href;
    var stype = document.rptform.rptproblem.value;
	var mode = (document.rptform.rptproblem.value=='1' ? 'brklink' : 'message');
    var url = "/webapps/pipe.asp?npid="+npid+"&ngid="+ngid+"&anTid="+anTid+"&spage="+spage+"&stype="+stype+"&mode="+mode
        if(stype=='1' || (stype=='2')) { doMessageWindow(url) }  // broekn link reporting
	    if(stype=='')  { alert('Select the type of error you have found!') } // err - no selection made
}

function doMessageWindow( url )
{
    var x = (screen.availWidth-200)
    var y = (screen.availHeight-200)
    var sLft = (screen.width) ? (screen.width-x)/2 : 0;
    var sTp = (screen.height) ? (screen.height-y)/2 : 0;
    var sSet = 'height='+y+',width='+x+',top='+sTp+',left='+sLft+',scrollbars=1,status=0,resizable=1'
        winman = window.open(url,'WindowMessage',sSet)
}

function mouseColorOn(src,clrOver){ 
var sColorOn
switch(clrOver)
   {
      case 1:
         sColorOn = "#333366";
         break;
      default:
         sColorOn = "#333366";
         break;
}
if (!src.contains(event.fromElement)){ 
		src.style.cursor = 'hand'; 
		src.bgColor = sColorOn; 
	} 
} 
function mouseColorOff(src,clrIn){ 
var sColorOff
switch(clrIn)
   {
      case 2:
         sColorOff = "#2965ad";
         break;
      case 3:
         sColorOff = "#2F7AC7";
         break;
      default:
         sColorOff = "#2965ad";
         break;
}
if (!src.contains(event.toElement)){ 
		src.style.cursor = 'default'; 
		src.bgColor = sColorOff; 
	} 
} 
function doTheURL(src){ 
	if(event.srcElement.tagName=='TD')
		src.children.tags('A')[0].click();
}

function doSearch(frm) {
var searchbox = frm.CiRestriction.value
var nStrTics = searchbox.indexOf("'") // any tic marks then raise an error
var nStrHiphins = searchbox.indexOf("--") // any Hiphins then raise an error
var nStrScriptlets = searchbox.indexOf("<"+"script") // any script refference then raise an error
if(searchbox=="") {
   alert("Please enter your search terms")
   document.searchbox.CiRestriction.focus();
   return false;
} 
if((nStrTics!=-1) || (nStrHiphins!=-1) || (nStrScriptlets!=-1)){
   alert("Malformed search terms found -- please try again")
   document.searchbox.CiRestriction.focus();
   return false;
 }
}

function doTopSearch() {
var siteform = document.searchboxtop;
var searchbox = siteform.CiRestriction.value
var errlog = 0
var nStrTics = searchbox.indexOf("'") // any tic marks then raise an error
var nStrHiphins = searchbox.indexOf("--") // any Hiphins then raise an error
var nStrScriptlets = searchbox.indexOf("<"+"script") // any script refference then raise an error
if(searchbox=="") {
   errlog = 1;
   alert("Please enter your search terms")
   document.searchboxtop.CiRestriction.focus();
} else if((nStrTics!=-1) || (nStrHiphins!=-1) || (nStrScriptlets!=-1)){
   errlog = 1;
   alert("Malformed search terms found -- please try again")
   document.searchboxtop.CiRestriction.focus();
} 
  if(errlog==0) { document.searchboxtop.submit(); }
}

//-->