
/*
var pic_id;

function img_s_over(id)
{
 pic_id=id;
 document.all['s'+id].bgColor="CadetBlue"; // change background of small GIF
}

function img_s_out(id)                         
{                          
 pic_id=id;
 document.all['s'+id].bgColor="#ffffff";
}

function img_s_click(id)
{
 document.all.main.src='images/'+id+'_l.jpg';
}
*/

/*
function fixPNG(myImage) // correctly handle PNG transparency in Win IE 5.5 or higher.
{
 if (window.ie55up)
 {
  var imgid = (myImage.id) ? "id='" + img.id + "' " : ""
  var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
  var imgTitle = (myImage.title) ? "title='" + myImage.title + "' " : "title='" + myImage.alt + "' "
  var imgStyle = "display:inline-block;" + myImage.style.cssText 
  var strNewHTML = "<span " + imgid + imgClass + imgTitle
  strNewHTML += " style=\"" + "width:" + myImage.width + "px; height:" + myImage.height + "px;" + imgStyle + ";"
  strNewHTML += "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
  strNewHTML += "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>" 
  myImage.outerHTML = strNewHTML
 }
}
*/

// Correctly handle PNG transparency in Win IE 5.5 or higher.
// http://homepage.ntlworld.com/bobosola. Updated 02-March-2004

/*
function correctPNG() 
   {
  for(var i=0; i<document.images.length; i++)
      {
	  var img = document.images[i]
	  var imgName = img.src.toUpperCase()
	  if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
	     {
		 var imgid = (img.id) ? "id='" + img.id + "' " : ""
		 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
		 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
		 var imgStyle = "display:inline-block;" + img.style.cssText 
		 if (img.align == "left") imgStyle = "float:left;" + imgStyle
		 if (img.align == "right") imgStyle = "float:right;" + imgStyle
		 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle		
		 var strNewHTML = "<span " + imgid + imgClass + imgTitle
		 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
	     + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		 + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
		 img.outerHTML = strNewHTML
		 i = i-1
	     }
      }
   }

window.attachEvent("onload", correctPNG);

window.status = "Done";
*/

function popup_window(id)
{
 var str,height,width;

 str='<html><head><title></title><meta http-equiv="refresh" content="0;url=pop.aspx?id='+id+'"></head></html>';

 width=420;
 height=300;

 win=window.open('','wino','status=no,resizable=no,scrollbars,height='+height+',width='+width+',left=100,top=100,screenX=100,screenY=100','true');

 win.focus();

 win.document.write(str);
 win.document.close();

 return true;
}

function fill_textbox(tb,s)
{
  var n;
  //alert(tb + ":" + s);

  if(tb == "name")
  {
    if(document.all) document.all.ctl00$ctl00$mlmr_cph$mlmr_cph$name_tb.innerText = s;
    else if(document.getElementById) document.getElementById('ctl00$ctl00$mlmr_cph$mlmr_cph$name_tb').firstChild.nodeValue = s;
  }
  else if(tb == "phone")
  {
    if(document.all) document.all.ctl00$ctl00$mlmr_cph$mlmr_cph$phone_tb.innerText = s;
    else if(document.getElementById) document.getElementById('ctl00$ctl00$mlmr_cph$mlmr_cph$phone_tb').firstChild.nodeValue = s;
  }
  else if(tb == "email")
  {
    if(document.all) document.all.ctl00$ctl00$mlmr_cph$mlmr_cph$email_tb.innerText = s;
    else if(document.getElementById) document.getElementById('ctl00$ctl00$mlmr_cph$mlmr_cph$email_tb').firstChild.nodeValue = s;
  }
  else if(tb == "content")
  {
    if(document.all)
    {
      n = document.all.ctl00$ctl00$mlmr_cph$mlmr_cph$content_tb.value;
      document.all.ctl00$ctl00$mlmr_cph$mlmr_cph$content_tb.innerText = n + "\n" + s;
    }
    else if(document.getElementById)
    {
      n = document.getElementById('ctl00$ctl00$mlmr_cph$mlmr_cph$content_tb').firstChild.nodeValue;
      document.getElementById('ctl00$ctl00$mlmr_cph$mlmr_cph$content_tb').firstChild.nodeValue = n + "\n" + s;
    }
  }
}

function fill(tb,s)
{
  var n;
  //alert(tb + ":" + s);

  if(tb == "detail")
  {
    if(document.all)
    {
      n = document.all.ctl00$ctl00$mlmr_cph$mlmr_cph$detail_tb.value;
      if(n != "") document.all.ctl00$ctl00$mlmr_cph$mlmr_cph$detail_tb.innerText = n + "," + s;
      else document.all.ctl00$ctl00$mlmr_cph$mlmr_cph$detail_tb.innerText = s;
    }
    else if(document.getElementById)
    {
      n = document.getElementById('ctl00$ctl00$mlmr_cph$mlmr_cph$detail_tb').firstChild.nodeValue;
      if(n != "") document.getElementById('ctl00$ctl00$mlmr_cph$mlmr_cph$detail_tb').firstChild.nodeValue = n + "," + s;
      else document.getElementById('ctl00$ctl00$mlmr_cph$mlmr_cph$detail_tb').firstChild.nodeValue = s;
    }
  }
}

function erase(tb)
{
  var n;
  //alert(tb + ":" + s);

  if(tb == "detail")
  {
    if(document.all)
    {
      document.all.ctl00$ctl00$mlmr_cph$mlmr_cph$detail_tb.innerText = "";
    }
    else if(document.getElementById)
    {
      document.getElementById('ctl00$ctl00$mlmr_cph$mlmr_cph$detail_tb').firstChild.nodeValue = "";
    }
  }
}
