function WindowCenter(mypage, myname, w, h, scroll, sbars)
{
	if(screen.width == 640)
	{
		if(w >= 300)
		{
			w = w - 100;
			h = h - 100;
		}
	}
	var winl = ((screen.width - w) / 2)-5;
	var wint = ((screen.height - h) / 2)-15;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+sbars+',resizable='+scroll+''
	win = window.open(mypage, myname, winprops);
//	win.location.reload(true);
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}


   	ok=false;
  	function Check(form)
  	{
  		if(!ok)
  		{
  		  for (var i=0;i<(form.elements.length);i++)
  		  {	form.elements[i].checked = true; ok=true; }
  		}
  		else
  		{
  			for (var i=0;i<(form.elements.length);i++)
  			{	form.elements[i].checked = false;	ok=false; }
  		}
  	}


function Obtem_ids(form,msg,path)
{
  var armazena='';
  for (var j=0;j<(form.elements.length);j++)
  {
  	if(form.elements[j].checked)
    	{
		armazena = armazena+form.elements[j].name+'-';
    	}
  }
	if(armazena=='')
 	{
  	  alert('Você precisa selecionar no mínimo um ítem a excluir!');
  	  return;
  	}
  	if(confirm(msg))
	{
        	window.location.replace(path+armazena);
	        return false;
	}
	else return false;
}

function set_status(io, text)
{
   prefix="Shopping D'arte";
   if(io == 0)
     window.status = prefix + ': ' + text;
   else
     window.status = prefix;
   return true;
}

        function checkBrowser()
        {
        	this.ver=navigator.appVersion
        	this.dom=document.getElementById?1:0
        	this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom)?1:0;
        	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
        	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
        	this.ie4=(document.all && !this.dom)?1:0;
        	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
        	this.ns4=(document.layers && !this.dom)?1:0;
        	this.bw=(this.ie7 || this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns5)
        	return this
        }

        function hideIt(div)
        {
        	if(bw.bw)
          {
        		div="divLoadCont"
        		obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?document[div]:0;
        		obj.visibility='hidden'
        	}
        }

function clique(){if (event.button==2||event.button==3){oncontextmenu='return false';}}
document.onmousedown=clique;
document.oncontextmenu = new Function("return false;");
function disableselect(e){return false;}
function reEnable(){return true;}
document.onselectstart=new Function ("return false");
if (window.sidebar){document.onmousedown=disableselect;document.onclick=reEnable;}
