function abrepop(){
	var arrayPageSize   = getPageSize();
	var arrayPageScroll = getPageScroll();
	document.getElementById('tampa').style.height  = pageHeight+'px';
	document.getElementById('tampa').style.display ='block';
	document.getElementById('popup').style.display ='block';
	//alert (pageHeight);	
}
function getPageScroll(){
	var yScroll;
	if (self.pageYOffset) {
		yScroll = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){  // Explorer 6 Strict
		yScroll = document.documentElement.scrollTop;
	} else if (document.body) {// all other Explorers
		yScroll = document.body.scrollTop;
	}
	arrayPageScroll = new Array('',yScroll) 
	return arrayPageScroll;
}
function getPageSize(){
	var xScroll, yScroll;
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	
	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}

	if(xScroll < windowWidth){	
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}

	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
	return arrayPageSize;
}
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  //alert (args.length);
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
	//alert (z);
    if (obj.style) { 
		obj=obj.style;
	}
    obj.display=v;
	}
}
function addFav(url, title){
    if (window.sidebar) window.sidebar.addPanel(title, url,"");
    else if(window.opera && window.print){
        var mbm = document.createElement('a');
        mbm.setAttribute('rel','sidebar');
        mbm.setAttribute('href',url);
        mbm.setAttribute('title',title);
        mbm.click();
    }
    else if(document.all){window.external.AddFavorite(url, title);}
}
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function getFlashMovieObject(movieName){
	if (window.document[movieName]){
		return window.document[movieName];
	}
	if (navigator.appName.indexOf("Microsoft Internet")==-1){
		if (document.embeds && document.embeds[movieName])
		return document.embeds[movieName];
	}else{ // if (navigator.appName.indexOf(”Microsoft Internet”)!=-1)
		return document.getElementById(movieName);
	}
}
function chamaMapa(valor){
	if(valor){
		var flashMovie=getFlashMovieObject('mapa');
		flashMovie.ativandoBt(valor);
	}
}
function mapa(linkando){
	if(linkando){
		ajax('dados.php?uf='+linkando,document.getElementById('dados'),true);
	}
}
var conta = 0;
function addpro(){
	conta++
	var button = document.createElement('div');
	button.setAttribute('id', 'pro'+conta);
	var conteudo = document.getElementById('pro');
	conteudo.appendChild(button);
	document.getElementById('pro'+conta).innerHTML = document.getElementById('prore').innerHTML;
}

function validarOr() {
	if(!document.getElementById('nome').value){
		alert("Informe seu nome!");
		document.getElementById('nome').focus();
		return false;
	}
	if(document.getElementById('nome').value.length < 3){
		alert("Preencha o campo Nome \n com seu Nome e Sobrenome" ); 
		document.getElementById('nome').focus();
		return false; 
	}
	if(!document.getElementById('email').value){
		alert("Preencha o campo e-mail!");
		document.getElementById('email').focus();
		return false;
	}

	if(!checkMail(document.getElementById('email').value)){
		alert('Informe um email válido!');
		document.getElementById('email').focus();
		return false;
	}
	
	if(!document.getElementById('telefone').value){
		alert( "Preencha o campo Telefone!" ); 
		document.getElementById('telefone').focus();
		return false; 
	}
	if(document.getElementById('telefone').value.length < 8){
		alert(unescape("Seu telefone de conter \n no m%EDnimo 8 digitos!")); 
		document.getElementById('telefone').focus();
		return false; 
	}

	if(!document.getElementById('cidade').value){
		alert( "Preencha o campo cidade!" ); 
		document.getElementById('cidade').focus();
		return false; 
	}
	if(!document.getElementById('estado').value){
		alert( "Preencha o campo estado!" ); 
		document.getElementById('estado').focus();
		return false; 
	}
	if(!document.getElementById('produto2').value){
		alert('Informe pelo menos um item!');
		document.getElementById('produto2').focus();
		return false;
	}
}
function checkMail(mail){
	var er = new RegExp(/^[A-Za-z0-9_\-\.]+@[A-Za-z0-9_\-\.]{2,}\.[A-Za-z0-9]{2,}(\.[A-Za-z0-9])?/);
	if(typeof(mail) == "string"){
		if(er.test(mail)){ return true; }
		}else if(typeof(mail) == "object"){
		if(er.test(mail.value)){ 
			return true; 
		}
	}else{
		return false;
	}
}


//-->