﻿// Dolphin system 

function OpenPopUpPage(Page,width,height)
{
window.open(Page, 'W', 'width='+ width +',height='+ height +',location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbars=no,left=300,right=150,top=300');
}

function ModalDialog(Url,objname) {
  showModalDialog(Url,window, 'resizable: yes; help: no; status: no; scroll: no;');
}


 function changeScreenSize(w,h)
 {
     window.resizeTo(w,h);
 }
   
   function log_out(){
   
   ht = document.getElementsByTagName("html");
   ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
   if (this.confirm('آيا مطمئن هستيد که مي خواهيد خارج شويد؟'))
   {
       ht[0].style.filter = "";
       close();
   }
   else{
       ht[0].style.filter = "";
       
       }
   }
  
    function keyenter(field,e){
var key;
if (window.event)
   key = window.event.keyCode;

if (key>31)
  if (key<128)
  {
    if (window.event)
      window.event.keyCode=' !"#$%،گ)(×+و-./0123456789:ك,=.؟@ِذ}ىُيلا÷ـ،/’د×؛َءٍف‘{ًْإ~جژچ^_پشذزيثبلاهتنمئدخحضقسفعرصطغظ<|>ّ'.charCodeAt(key-32);
  }
}
function bookmark(title,url){
   if (window.sidebar) // firefox
	  window.sidebar.addPanel(title, url, "");
   else if(window.opera && window.print)
   { // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
	} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}