function OpenOrderForm(page , web ) 
   {
        if(page == undefined || page =='' || web == undefined || web == '')
        {
            //post=current_posting;
            return;
        }   
        parameters = '&pageGuid=' + page + '&webGuid=' + web ;
      //OpenModalWindow(https_enabled,true,site_prefix,'/SystemFiles/FormOrder.aspx',post,my_lang,'450','400',null)
      OpenModalWindow(false,true,'SystemFiles/Forms/FormOrder.aspx',parameters,'480','400',null)
   }
   
   function OpenForm(form , lang , type ) 
   {
        if(form == undefined || form =='')
        {
            //post=current_posting;
            return;
        }   
        parameters = '&lang=' + lang  + '&rtype=' + type ;
      //OpenModalWindow(https_enabled,true,site_prefix,'/SystemFiles/FormOrder.aspx',post,my_lang,'450','400',null)
        page_name = 'SystemFiles/Forms/' + form
        height = "600"
        if (type == '2') //general questions
            height = "500"
        if (type == '1' || type == '4' ) //pniot questions
            height = "560"
        OpenModalWindow(false, true, page_name, parameters, '450', height, null)
   }
   
   function OpenPublicationOrder(page , web)
   {
        if(page == undefined || page =='' || web == undefined || web == '')
        {
            //post=current_posting;
            return;
        }   
           
    parameters = '&pageGuid=' + page + '&webGuid=' + web ;
    OpenModalWindow(false,true,'SystemFiles/Forms/PublicationOrder.aspx',parameters,'470','610',null)
   }
   
   function OpenModalWindow(https_enabled,is_https,page_name,parameters,width,height,arg_array)
   {
   var prefix = "";

   if (location.hostname.toLowerCase() == "www.btl.gov.il" || location.hostname.toLowerCase() == "www2.btl.gov.il") {
       prefix = "https://" + location.hostname;
   }
   
   
   //(is_https==true && https_enabled==true ?'https://':'http://') + site_prefix ;
  
    var dialog_path =prefix+'/SystemFiles/Dialog_Matefet.aspx';
//    if(is_https==true && https_enabled==true)
//        dialog_path =prefix+ '/Dialog_ssl.aspx';
    
    var path =prefix +'/'+ page_name + parameters;
//    if(current_posting !='' && current_posting !=undefined)
//         path =path +'&current_posting='+current_posting
//    if(my_lang !='')
//	     path =path+'&lang='+my_lang 
	     
	if(document.all)    //IE
	
	    var retVal=window.showModalDialog(dialog_path +'?path='+ path,arg_array,'dialogHeight:'+height+'px; dialogWidth:'+width+'px;  edge: Raised; center: yes; help: No; resizable: yes; scroll: No; status: No;location:no')
	
	else             //firefox
	
	   window.open(dialog_path +'?path='+ path,arg_array, 'height='+height+'px,width='+width+'px,directories=no,location=no,menubar=no,status=no,toolbar=no ,center=yes')
	
}

 function CloseWindow()
 {
    parent.window.close();
 }
//function OpenModalWindow(https_enabled,is_https,site_prefix,page_name,current_posting,my_lang,width,height,arg_array){
//   var prefix = (is_https==true && https_enabled==true ?'https://':'http://') + site_prefix ;
//  
//    var dialog_path =prefix+'/Dialog_Matefet.aspx';
//    if(is_https==true && https_enabled==true)
//        dialog_path =prefix+ '/Dialog_ssl.aspx';
//    
//    var path =prefix +'/'+ page_name;
//    if(current_posting !='' && current_posting !=undefined)
//         path =path +'&current_posting='+current_posting
//    if(my_lang !='')
//	     path =path+'&lang='+my_lang 
//	     
//	if(document.all)    //IE
//	
//	    var retVal=window.showModalDialog(dialog_path +'?path='+ path,arg_array,'dialogHeight:'+height+'px; dialogWidth:'+width+'px;  edge: Raised; center: yes; help: No; resizable: no; scroll: Auto; status: No;location:no')
//	
//	else             //firefox
//	
//	   window.open(dialog_path +'?path='+ path,arg_array, 'height='+height+'px,width='+width+'px,directories=no,location=no,menubar=no,status=no,toolbar=no ,center=yes')
//	
//}

