<!-- find a way to break out specific and generic functions -->

<!-- generic -->
  function highlightTR(row){  
    row.className = "selectedRow"
    setPointerHand()
  }

<!-- generic -->
  function unhighlightTR(row){  
    row.className = "unselectedRow"
    setPointerDefault()
  }

<!-- generic -->
  function highlightTD(cell){  
    cell.className = "menuItem_TopLevel3"
    setPointerHand()
  }

<!-- generic -->
  function unhighlightTD(cell){  
    cell.className = "menuItem"
    setPointerDefault()
  }

<!-- generic -->
function setPointerHand() {
  setPointer('hand');
}

<!-- generic -->
function setPointerDefault() {
  setPointer('default');
}

<!-- generic -->
function setPointer(pointerStyle) {
    if (document.all)
        for (var i=0;i < document.all.length; i++)
             document.all(i).style.cursor = pointerStyle;
}

<!-- specific -->
  var applicationServerURL = "OpenProperty.do";

<!-- specific -->
  function selectBlock(mblId) {
    window.location = 'ViewBlock.do?mblId=' + mblId + '&page=1&sub=orders'
  }


<!-- specific -->
  function callBlock(blockId) {
    openApplicationWindow(applicationServerURL+"?type=block&blockId=" + blockId);
  }

<!-- specific -->
  function callContract(contractId, projectId) {
    if(projectId == null || projectId == " "){
      openApplicationWindow(applicationServerURL+"?type=contract&contractId=" + contractId);
    }
    else {
      openApplicationWindow(applicationServerURL+"?type=project&projectId=" + projectId);
    }
  }

<!-- specific -->
  function callForecast(forecastId) {
    openApplicationWindow(applicationServerURL+"?type=forecast&forecastId=" + forecastId);
  }

<!-- specific -->
  function callOrder(orderId) {
    openApplicationWindow(applicationServerURL+"?type=order&orderId=" + orderId);
  }

<!-- specific -->
  function callSurvey(surveyId, module) {
    openApplicationWindow(applicationServerURL+"?type=survey&surveyId=" + surveyId + "&module=" + module);
  }

<!-- specific -->
  function openImage(mblId, imaId){
      openApplicationWindow('BinaryProvider?type=image&primary=n&mblId=' + mblId + "&imaId=" + imaId);
  }
<!-- specific -->
  function openRepresentation(aplId){
      openApplicationWindow('representationForm.jsp?aplId='+aplId);
  }  
<!-- specific -->
  function openTab2(aplId){
      window.location=('./tabPage2.jsp?aplId='+aplId);
  }   
  
<!-- specific -->
  function openTab1(aplId){
      window.location=('./tabPage1.jsp?aplId='+aplId);
  }  
  
 <!-- specific -->
  function openTab3(aplId){
      window.location=('./tabPage3.jsp?aplId='+aplId);
  }  
  
<!-- specific -->
  function openFileUpload(Id){
      window.location=('./FileUploadLoad.do?id='+Id);
  }    
 

<!-- specific -->
  var win = null;
  function openWmnForm(sessionId, argId,myname,w,h,scroll) {    
    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
    settings =
    'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',status=no,resizable'
    win = window.open('./editWmnPopulate.do;jsessionid='+sessionId+'?id='+argId,myname,settings)
  }

<!-- specific -->
  var win = null;
  function openCheckForm(sessionId, argId,myname,w,h,scroll) {    
    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
    settings =
    'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',status=no'
    
    if (myname == "ckFln"){
    win = window.open('./checklistFlnPopulate.do;jsessionid='+sessionId+'?id='+argId,myname,settings)
  }
    if (myname == "ckHdl"){
    win = window.open('./checklistHdlPopulate.do;jsessionid='+sessionId+'?id='+argId,myname,settings)
  }
    if (myname == "ckCld"){
    win = window.open('./checklistCldPopulate.do;jsessionid='+sessionId+'?id='+argId,myname,settings)
  }
    if (myname == "cka"){
    win = window.open('./checklistAPopulate.do;jsessionid='+sessionId+'?id='+argId,myname,settings)
  }
  if (myname == "ckb"){
    win = window.open('./checklistBPopulate.do;jsessionid='+sessionId+'?id='+argId,myname,settings)
  }

   if (myname == "ckc"){
    win = window.open('./checklistCPopulate.do;jsessionid='+sessionId+'?id='+argId,myname,settings)
  }
   if (myname == "ckd"){
    win = window.open('./checklistDPopulate.do;jsessionid='+sessionId+'?id='+argId,myname,settings)
  }
   if (myname == "cke"){
    win = window.open('./checklistEPopulate.do;jsessionid='+sessionId+'?id='+argId,myname,settings)
  }
   if (myname == "ckf"){
    win = window.open('./checklistFPopulate.do;jsessionid='+sessionId+'?id='+argId,myname,settings)
  }
   if (myname == "ckg"){
    win = window.open('./checklistGPopulate.do;jsessionid='+sessionId+'?id='+argId,myname,settings)
  }
   if (myname == "ckh"){
    win = window.open('./checklistHPopulate.do;jsessionid='+sessionId+'?id='+argId,myname,settings)
  }
   if (myname == "cki"){
    win = window.open('./checklistIPopulate.do;jsessionid='+sessionId+'?id='+argId,myname,settings)
  }
   if (myname == "ckj"){
    win = window.open('./checklistJPopulate.do;jsessionid='+sessionId+'?id='+argId,myname,settings)
  }
   if (myname == "ckk"){
    win = window.open('./checklistKPopulate.do;jsessionid='+sessionId+'?id='+argId,myname,settings)
  }
  }
<!-- generic -->
  var win = null;
  function openHelpWindow(mypage,myname,w,h,scroll){
  LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
  TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
  settings =
  'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
  win = window.open(mypage,myname,settings)
  }

<!-- specific -->
  var win = null;
  function openCtForm(sessionId, argId,myname,w,h,scroll) {    
    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
    settings =
    'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',status=no'
    win = window.open('./chooseOwnCertLoad.do;jsessionid='+sessionId+'?id='+argId,myname,settings)
  }

<!-- specific -->
  var win = null;
  function openPdfForm(argId,appType,myname,w,h,scroll) {    
    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
    settings =
    'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',status=no'
    win = window.open('./pdfprovider?id='+argId+'&apptype='+appType,myname,settings)
  }


<!-- specific -->
  var win = null;
  function openFeeForm(sessionId, argId,myname,w,h,scroll) {    
    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
    settings =
    'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',status=no'
    win = window.open('./loadFeeA.do;jsessionid='+sessionId+'?id='+argId,myname,settings)
  }
  
  

<!-- specific -->
  var win = null;
  function openFlnForm(sessionId, argId,myname,w,h,scroll) {    
    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
    settings =
    'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable,status=no'
    win = window.open('./editFlnPopulate.do;jsessionid='+sessionId+'?id='+argId,myname,settings)
  }
 <!-- specific -->
  var win = null;
  function openHdlForm(sessionId, argId,myname,w,h,scroll) {    
    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
    settings =
    'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable,status=no'
    win = window.open('./editHdlPopulate.do;jsessionid='+sessionId+'?id='+argId,myname,settings)
  }
  
<!-- specific -->
  var win = null;
  function openCldForm(sessionId, argId,myname,w,h,scroll) {    
    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
    settings =
    'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',status=no,resizable'
    win = window.open('./editCldPopulate.do;jsessionid='+sessionId+'?id='+argId,myname,settings)
  } 
<!-- specific -->
  var win = null;
  function sessionTimeout() {    
    window.opener.location.href="./sessionTimeoutLoad.do";
    self.close();
  }
  
  
<!-- generic (for ATRIUMproperty -->
function openApplicationWindow(url){
	paramlist = "toolbar=no,";
	paramlist += "scrollbars=yes,";
	paramlist += "menubar=yes,";
	paramlist += "status=no,";
	paramlist += "resizable=no,";
	paramlist += "width=1024,";
	paramlist += "height=768,";
	paramlist += "left=50,";
	paramlist += "top=50";

	winname = window.open(url, "ATRIUMproperty", paramlist);
}

<!-- specific -->
  function refreshLocation(mblId, page, sub, zonId) {
    window.location = 'ViewBlock.do?mblId=' + mblId + '&page=' + page + '&sub=' + sub + '&zonId=' + zonId;
  }

<!-- specific -->
  function refreshAsset(mblId, page, sub, zonId, assId) {
    window.location = 'ViewBlock.do?mblId=' + mblId + '&page=' + page + '&sub=' + sub + '&zonId=' + zonId + '&assId=' + assId;
  }

<!-- specific -->
  function openDocument(verId) {
 
 openApplicationWindow('BinaryProvider?type=document&verId=' + verId);
 
  }

<!-- specific -->
  function openPaymentWindow(argUrl, argSessionId) {
 
 openApplicationWindow(argUrl +'&MC_sessionid='+argSessionId);
 
  }
 
  