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);




function CheckKeyPress(e,txt)
{  
 
    if(e)
    {
        e = e
    }     
    else 
    {
        e = window.event
    }

    if(e.which)
    {
        var keycode = e.which
    } 
    else 
    {
        var keycode = e.keyCode
    }

    if (keycode==32 && txt.value.length==0)
    {        
        return false;
    }
    if (keycode==13)
    {        
        document.getElementById('ctl00_ContentPlaceHolder1_HFValue').value='Press';
    } 
    else
    {
        document.getElementById('ctl00_ContentPlaceHolder1_HFValue').value='NotPress';
    } 
}     
function eventpop(lnkid)
{
  var id=lnkid.id.toString().substring(0,lnkid.id.toString().length-3) + "lblDes";      
  document.getElementById('ctl00_lblNews').innerHTML=document.getElementById(id).innerHTML;
  document.getElementById('dvnews').style.display='block';    
  document.getElementById('dvnewsDesc').style.display='block';
  document.getElementById('ctl00_ContentPlaceHolder1_DDLSort').style.display='none';                       
  
}

function eventpophide()
{
  document.getElementById('ctl00_ContentPlaceHolder1_DDLSort').style.display='block';
  document.getElementById('ctl00_lblNews').innerHTML="";
  document.getElementById('dvnews').style.display='none';    
  document.getElementById('dvnewsDesc').style.display='none';
}

function op() 
{
    window.open('http://viz.mbci.biz/viz/_diamond/index.cfm?browseBy=wood', 'CustomPopUp', 'width=800,Height=550,resizable=yes');
}

function starttodream() 
{
    window.open('http://www.diamondcabinets.com/starttodream/applicationIndex.cfm', 'CustomPopUp', 'menubar=no,width=1100, height=800, resizable=yes');
}

function help() 
{
    window.open('help.aspx', 'CustomPopUp', 'menubar=no,width=1100, height=800, resizable=yes');
}
function organization() 
{
    window.open('organization.aspx', 'CustomPopUp', 'menubar=no,width=1100, height=800, resizable=yes');
}
function getsub()
{
    document.getElementById('ctl00$ContentPlaceHolder1$hdnsub').value = document.getElementById('contact_content').innerHTML;
}
