﻿function checkFunc(url,Bwidth,BminHeight,Bheight,left,top,header){var leightBox=document.getElementById("div-disable");leightBox.style.visibility="visible";var boxing=document.getElementById("div-nextstep");boxing.style.visibility="visible";boxing.style.height=Bheight+"px";boxing.style.minHeight=BminHeight+"px";boxing.style.width=Bwidth+"px";boxing.style.left=left+"%";boxing.style.top=top+"%";document.getElementById('iframe1').src=url;document.getElementById('iframe1').style.height=Bheight+"px";document.getElementById('popupHeader').innerText=header;document.getElementById('popupHeader').textContent=header;leightBox.style.height=heightPage()+"px";}
function backPage(){document.getElementById("div-nextstep").style.visibility="hidden";document.getElementById("div-disable").style.visibility="hidden";document.getElementById('iframe1').src="";}
function heightPage(){var docHeight;if(document.compatMode&&document.compatMode!='BackCompat'){docHeight=document.documentElement.scrollHeight;}
else if(document.body&&document.body.scrollHeight){docHeight=document.body.scrollHeight;}
return docHeight;}
function dyniframesize(iframename){var pTar=null;if(document.getElementById){pTar=document.getElementById(iframename);}
if(pTar&&!window.opera){pTar.style.display="block"
if(pTar.contentDocument&&pTar.contentDocument.body.offsetHeight){pTar.height=pTar.contentDocument.body.offsetHeight+20;}
else if(pTar.Document&&pTar.Document.body.scrollHeight){pTar.height=pTar.Document.body.scrollHeight+4;}}}

function  showQuestion(name,header)
     {
   if(document.getElementById(name).style.display=="")
    {
     document.getElementById(name).style.display="none";
     document.getElementById(header).innerHTML="<img src='App_Themes/default/image/open.png' alt='' />";
    }
   else
    {
    document.getElementById(name).style.display="";
    document.getElementById(header).innerHTML="<img src='App_Themes/default/image/close.png' alt='' />";
   }
   }
   
   function keypress(myfield,e)
{
var key;
if (window.event)
   key = window.event.keyCode;
else if (e)
   key = e.which;
if (key>31)
if (key<128)
{
if (window.event)
    window.event.keyCode=' !"#$%،گ)(×+و-./0123456789:ك,=.؟@ِذ}ىُىلآ÷ـ،/’د×؛َءٍف‘{ًْإ~جژچ^_پشذزيثبلاهتنمئدخحضقسفعرصطغظ<|>ّ'.charCodeAt(key-32);
else if (e)
   e.which=' !"#$%،گ)(×+و-./0123456789:ك,=.؟@ِذ}ىُىلآ÷ـ،/’د×؛َءٍف‘{ًْإ~جژچ^_پشذزيثبلاهتنمئدخحضقسفعرصطغظ<|>ّ'.charCodeAt(key-32);

   }
   	return true;
}
function noError()
{
  if (track_errors==1)
     {
        return true;
     }
}
window.onerror = noError;
