function fWindowOpen(pagina,nome,altura,largura)
	{
		var leftPos = (screen.width/2)-(largura/2);
		var topPos = (screen.height/2)-(altura/2);
		//alert(leftPos);
		var contentPage = window.open("",nome,'toolbar=no,scrollbars=no,resizable=no,location=no,directories=no,status=no,menubar=no,width='+largura+',height='+altura+',left='+leftPos+',top='+topPos+'');
		contentPage.document.write("<HTML><HEAD><TITLE>Projetando PVC</TITLE>");
		contentPage.document.write("</HEAD><BODY topmargin='0' leftmargin='0'><IMG src="+pagina+" border='0'></BODY></HTML>");
	}
function RodarFlash(path,variaveis,_width,_height)
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+_width+'" height="'+_height+'">');
		document.write('<param name="movie" value="'+path+'?'+variaveis+'">');
		document.write('<param name="quality" value="high">');
		document.write('<param name="wmode" value="transparent">');
		document.write('<embed src="'+path+'?'+variaveis+'" width="'+_width+'" height="'+_height+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>');
	document.write('</object>');
}
function SubMenu(parametro)
{
	if(parametro == 'mostra')
	{
		document.getElementById('menu').style.zIndex = '10';
		document.getElementById('conteudo').style.zIndex = '1';
	}
	else
	{
		document.getElementById('menu').style.zIndex = '1';
		document.getElementById('conteudo').style.zIndex = '10';
	}
}

var defaultEmptyOK = false
var whitespace = " \t\n\r";
function isEmail (s)
{  
	
 if (isEmpty(s)) 
       if (isEmail.arguments.length == 1) return defaultEmptyOK;
       else return (isEmail.arguments[1] == true);
   
    if (isWhitespace(s)) return false;
    var i = 1;
    var sLength = s.length;

    // look for @
    while ((i < sLength) && (s.charAt(i) != "@"))
    { i++
    }

    if ((i >= sLength) || (s.charAt(i) != "@")) return false;
    else i += 2;

    while ((i < sLength) && (s.charAt(i) != "."))
    { i++
    }

    if ((i >= sLength - 1) || (s.charAt(i) != ".")) return false;
    else return true;
}

function isEmpty(s)
{   return ((s == null) || (s.length == 0))
}
function isWhitespace (s)

{   var i;

    // Is s empty?
    if (isEmpty(s)) return true;

    for (i = 0; i < s.length; i++)
    {   
        var c = s.charAt(i);

        if (whitespace.indexOf(c) == -1) return false;
    }

    return true;
}