var isIe=(document.all)?true:false;
function setSelectState(state)
{
var objl=document.getElementsByTagName('select');
for(var i=0;i<objl.length;i++)
{
objl[i].style.visibility=state;
}
}
function mousePosition(ev)
{
if(ev.pageX || ev.pageY)
{
return {x:ev.pageX, y:ev.pageY};
}
return {
x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,y:ev.clientY + document.body.scrollTop - document.body.clientTop
};
}
function showMessageBox(wTitle,content,pos,wWidth)
{
closeWindow();
var bWidth=parseInt(document.documentElement.scrollWidth);
var bHeight=parseInt(document.documentElement.scrollHeight);
if(isIe){
setSelectState('hidden');}
var back=document.createElement("div");
back.id="back";
var styleStr="top:0px;left:0px;position:absolute;background:#000;width:"+bWidth+"px;height:"+bHeight+"px;";
styleStr+=(isIe)?"filter:alpha(opacity=60);":"opacity:0.60;";
back.style.cssText=styleStr;
document.body.appendChild(back);
var mesW=document.createElement("div");
var MarginTopValue=MarginTop();
mesW.id="mesWindow";
mesW.className="mesWindow";
mesW.innerHTML="<div class='mesWindowTop' style='margin-top:"+MarginTopValue+"px'><table width='100%' height='100%'><tr><td style='color:#FFF'>"+wTitle+"</td><td style='color:#FFF;' align='right'><div onclick='closeWindow();'><b>Close</b></div></td></tr></table></div><div class='mesWindowContent' id='mesWindowContent'>"+content+"</div><div class='mesWindowBottom'></div>";




//styleStr="left:"+(((pos.x-wWidth)>0)?(pos.x-wWidth):pos.x)+"px;top:"+(pos.y)+"px;position:absolute;width:"+wWidth+"px;";
styleStr="left:"+((window.screen.width-wWidth)/2)+"px;top:0px;position:absolute;";
mesW.style.cssText=styleStr;




document.body.appendChild(mesW);
}
function showBackground(obj,endInt)
{
obj.filters.alpha.opacity+=1;
if(obj.filters.alpha.opacity<endInt)
{
setTimeout(function(){showBackground(obj,endInt)},500);
}
}
function closeWindow()
{
if(document.getElementById('back')!=null)
{
document.getElementById('back').parentNode.removeChild(document.getElementById('back'));
}
if(document.getElementById('mesWindow')!=null)
{
document.getElementById('mesWindow').parentNode.removeChild(document.getElementById('mesWindow'));
}
if(isIe){
setSelectState('');}
}
function JQStyle(ev)
{
var objPos = mousePosition(ev);
messContent="<div class='divcenter'><img src='"+ev+"' onclick='closeWindow()' title='Click to close' /></div>";
showMessageBox('Screenshot',messContent,objPos,700);
}

var TagArea = document.getElementById("supportDetailContentArea");
var ImgArray = TagArea.getElementsByTagName("IMG");
  function addClick()
  {
      for(i=0;i<ImgArray.length;i++)
      {
          if (isIe)
          {
            ImgArray[i].attachEvent("onclick", new Function("method("+i.toString()+");"));
          }
          else
          {
          ImgArray[i].addEventListener("click", new Function("method("+i.toString()+");"),false);
          }
          ImgArray[i].style.cursor = "pointer";
      }
  }
function method(p)
{
var NewSrc=ImgArray[p].src;
JQStyle(NewSrc);
}
addClick();


lastScrollY=0;
function MarginTop()
    {
    var diffY;
    if (document.documentElement && document.documentElement.scrollTop)
    {
        diffY = document.documentElement.scrollTop;
    }
    else if (document.body)
    {
        diffY = document.body.scrollTop;
    }
    else
    {
        /*Netscape stuff*/
    }
    return diffY;
    }