
var LoginPanel = new Ext.Panel({

      width:  540,
      height: 325,

      floating: true,
      border:false,

      html: "<iframe name='LoginPanel' width=560 height=350 frameborder=0 marginWidth=0 marginHeight=0></iframe>"
//      items: { xtype:'box', autoEl:{ tag:'iframe', name:'LoginPanel', width:540, height:325, frameborder:0 } }

   });

   LoginPanel.goURL = function(URL,enablecs)
   {
      if (checkLogin())
      {
         window.location = URL;
         return;
      }

      if (enablecs) document.LoginPanelForm.enablecs.value = "yes";

      document.LoginPanelForm.goURL.value = URL;
      document.LoginPanelForm.submit();

      mallsWrapMask.show();
      this.el.center();
      this.show();
   };

   LoginPanel.submit = function(frm,args)
   {
      if (args) for (a in args) eval("frm."+a+".value=args[a]");

      if (checkLogin())
      {
         frm.submit();
         return;
      }

      this.form = frm;

      document.LoginPanelForm.enablecs.value = "yes";
      document.LoginPanelForm.goURL.value = "";
      document.LoginPanelForm.submit();

      mallsWrapMask.show();
      this.el.center();
      this.show();
   };

   LoginPanel.close = function()
   {
      document.LoginPanelForm.goURL.value = "";
      this.form = null;

      mallsWrapMask.hide();
      this.hide();
   };


var mallsWrapMask;


function setLocationPos( html, rewrite )
{
   var pos = Ext.select("#location div.pos");

   if (rewrite) pos.item(0).dom.innerHTML = html;
   else pos.item(0).dom.innerHTML += " > "+html;
}


Ext.BLANK_IMAGE_URL = '/img/s.gif';

Ext.onReady(function()
{
   var currentLocation = Ext.select(".currentLocation");

   if (currentLocation && currentLocation.getCount()) setLocationPos(currentLocation.item(0).dom.innerHTML);

   mallsWrapMask = new Ext.LoadMask("mallsWrap",{msgCls:'x-mask-none'});
   LoginPanel.render("mallsWrap");

   if (window.initialize) initialize();
});


function zoomImage(pCode)
{
   window.open("/php/zoomImage.php?pCode="+pCode,"largeView_"+pCode,"width=630,height=620,scrollbars=no,status=yes");
}


