
function openWindow(urltxt, wid, high) 
{ 		
  wid+=23;
  high+=34;
  var flagvar=0;
  
  confirmWin=window.open(urltxt, "Thandie", 
                         "height=" +high+ ",width="+wid+",directories=no,location=no,menubar=no," +
                         "resizable=no,status=no,toolbar=no,scrollbars=no,top=0,left=0");
  
  if (window.confirmWin)
  { 
    if (window.focus) 
    { 
      if ((navigator.appName.indexOf("Microsoft Internet Explorer")!=-1)
          &&
          (navigator.appVersion.indexOf("4.") != -1)
          &&
          (parent.length>0))
      { 
        window.confirmWin.close(); 
        flagvar=1;
        timevar = setTimeout("openit(urltxt)", 300);      
      }
      else
      {
        confirmWin.focus();
      }
    } 
    else
    {  
      if (navigator.appName.indexOf("Microsoft Internet Explorer") != -1)  // If this is a MSIE Browser
      {  
        if (navigator.appVersion.indexOf("3.") != -1)  // MSIE 3.x
        {
          if (isLoaded == true)
          {
            alert("If the large image does not pop up, press the 'Product Close-up' tab in your task bar, or locate the image browser behind your open window." );
            return;
          }
          else
          {
            alert("If the Site Menu bar does not pop up, press the 'Product Close-up' tab in your task bar, or locate the image browser behind your open window." );
            return;
          } 
        } 
      }
    }
  }          
  else
  {
    confirmWin = window.open(urltxt, "Thandie", 
                             "height=" +high+ ",width="+wid+",directories=no,location=no,menubar=no," +
                   "resizeable=no,status=no,toolbar=no");
    var isLoaded = true;
  }
  
  // This is important for Netscape 2.0 to enable the opener property
  if (flagvar!=1)
  {
    if (confirmWin.opener == null)
    {
      confirmWin.opener = self;
    }
  }
} 


function popup1(urltxt, wid, high) 
{ 		
  
  var flagvar=0;
  
  confirmWin=window.open(urltxt, "Thandie", 
                         "height=" +high+ ",width="+wid+",directories=no,location=no,menubar=no," +
                         "resizable=no,status=no,toolbar=no,scrollbars=yes,top=0,left=0");
  
  if (window.confirmWin)
  { 
    if (window.focus) 
    { 
      if ((navigator.appName.indexOf("Microsoft Internet Explorer")!=-1)
          &&
          (navigator.appVersion.indexOf("4.") != -1)
          &&
          (parent.length>0))
      { 
        window.confirmWin.close(); 
        flagvar=1;
        timevar = setTimeout("openit(urltxt)", 300);      
      }
      else
      {
        confirmWin.focus();
      }
    } 
    else
    {  
      if (navigator.appName.indexOf("Microsoft Internet Explorer") != -1)  // If this is a MSIE Browser
      {  
        if (navigator.appVersion.indexOf("3.") != -1)  // MSIE 3.x
        {
          if (isLoaded == true)
          {
            alert("If the large image does not pop up, press the 'Product Close-up' tab in your task bar, or locate the image browser behind your open window." );
            return;
          }
          else
          {
            alert("If the Site Menu bar does not pop up, press the 'Product Close-up' tab in your task bar, or locate the image browser behind your open window." );
            return;
          } 
        } 
      }
    }
  }          
  else
  {
    confirmWin = window.open(urltxt, "Thandie", 
                             "height=" +high+ ",width="+wid+",directories=no,location=no,menubar=no," +
                   "resizeable=no,status=no,toolbar=no");
    var isLoaded = true;
  }
  
  // This is important for Netscape 2.0 to enable the opener property
  if (flagvar!=1)
  {
    if (confirmWin.opener == null)
    {
      confirmWin.opener = self;
    }
  }
} 


function doProcessing() 
{
	document.getElementById('prequalsubmit').className = 'thide'; 
	document.getElementById('processing').className = 'tshow';
}
//this function is only for the "windows" services pages  
function calculatePopPrgCssPropertiesWindows() 
{ 
	var maximumHeight = 570;
	var leftHeight = document.getElementById("copycontent").offsetHeight;
	var rightHeight = document.getElementById("formcontent").offsetHeight;
	if( leftHeight > maximumHeight ||rightHeight > maximumHeight)
	{
		if(leftHeight > rightHeight)
		{
			maximumHeight = leftHeight+45;
		}
		else
		{
			maximumHeight = rightHeight;
		}
	}
//this code dynamically adjust the size of only preform and form page	
if(document.getElementById("body")!= null ||document.getElementById("body1")!= null)
{
	var rightHeight1 = document.getElementById("formbox").offsetHeight;
	if(leftHeight < maximumHeight && leftHeight < rightHeight1)
	{	
		if(document.getElementById("body")!= null )
		{	
			maximumHeight =leftHeight-100;
		}
		maximumHeight =rightHeight1+30;
	}
	else
	{	
		if(document.getElementById("body")!= null )
		{	
			maximumHeight =leftHeight-100;
		}
		else
			maximumHeight =rightHeight1+30;
	}
}
	document.getElementById("copycontent").style.height=maximumHeight+45;
	document.getElementById("formcontent").style.height=maximumHeight+45;
	document.getElementById("bordergradientleft").style.height=maximumHeight+45; 
	document.getElementById("bordergradientright").style.height=maximumHeight+45; 
	document.getElementById("formbox").style.height=document.getElementById("formcontent").offsetHeight-15;
	document.getElementById("footerform").style.top=maximumHeight+275;

} 	
//this function is for rest of services pages  
function calculatePopPrgCssProperties() 
{ 
	var maximumHeight = 465;
	var rightHeight = document.getElementById("formbox1").offsetHeight;
	if(rightHeight > maximumHeight)
		maximumHeight=rightHeight+45;
		
	document.getElementById("copycontent").style.height=maximumHeight;
	document.getElementById("formcontent").style.height=maximumHeight;
	document.getElementById("bordergradientright").style.height=maximumHeight; 
	document.getElementById("formbox1").style.height=document.getElementById("formcontent").offsetHeight-15;
	document.getElementById("footerform").style.top=maximumHeight+230;

} 	