
function ajusteThumbs(tem)
{
		if(tem=="true")
		{
			var scroller  = null;
			var scrollbar = null;
			scroller  = new jsScroller(document.getElementById("Scroller-1"), 597, 200);
			scrollbar = new jsScrollbar (document.getElementById("Scrollbar-Container"), scroller, false);
			document.getElementById('conteudo').style.height = "200px";
			document.getElementById('Scroller-1').style.height = "200px";
			//document.getElementById('scrollBar').Scrollbar-Track.style.height = "180px";
		}
		else
		{
			var scroller  = null;
			var scrollbar = null;
			scroller  = new jsScroller(document.getElementById("Scroller-1"), 597, 200);
			scrollbar = new jsScrollbar (document.getElementById("Scrollbar-Container"), scroller, false);
			document.getElementById('conteudo').style.height = "200px";
			document.getElementById('Scroller-1').style.height = "200px";
			//document.getElementById('scrollBar').Scrollbar-Track.style.height = "380px";
		}
}


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 RodarFlashFull(path, variaveis)
{
	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="100%" height="100%">')
		document.write('<param name="allowScriptAccess" value="sameDomain" />')
		document.write('<param name="movie" value="'+path+'?'+variaveis+'"/>')
		document.write('<param name="quality" value="high" />')
		document.write('<param name="scale" value="noscale" />')
		document.write('<param name="wmode" value="transparent" />')
		document.write('<embed src="'+path+'?'+variaveis+'" quality="high" wmode="transparent" scale="noscale" width="100%"  height="100%" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />')
	document.write('</object>')
}


function fWindowOpen2(pagina,nome,largura,altura,scroll)
	{
		var leftPos = (screen.width/2)-(largura/2);
		var topPos = (screen.height/2)-(altura/2);
		//alert(leftPos);
		window.open(pagina,nome,'toolbar=no,scrollbars='+scroll+',resizable=no,location=no,directories=no,status=no,menubar=no,width='+largura+',height='+altura+',left='+leftPos+',top='+topPos+'');
	}
	
	
/*   */	
function fWindowOpen(pagina,nome,largura,altura,scroll)
{
	var leftPos = (screen.width/2)-(largura/2);
	var topPos = (screen.height/2)-(altura/2);
	//alert(leftPos);
	var contentPage = window.open("",nome,'toolbar=no,scrollbars='+scroll+',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 mudadivcont(lnkativo,ativo){
	alert(lnkativo);
	alert(ativo)
	
	document.getElementById(lnkativo).style.display = "none";
	document.getElementById(ativo).style.display = "block";
	if(ativo=='pagina')
	{
		document.getElementById('cell').style.margin = "-538px auto auto -472px";
		document.getElementById('image').style.display = "none";
		if(navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion == "4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)")
		{
			document.getElementById('cell').style.margin = "-605px auto auto -472px";
		}
	}
	else
	{
		document.getElementById('cell').style.margin = "-411px auto auto -472px";
	}
}


function imageGr(img)
{
	alert(img)
	document.getElementById('cell').style.margin = "-948px auto auto -472px";
	document.getElementById('image').style.display = "block";
	document.getElementById('bgr').style.background = "url("+img+")";
	if(navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion == "4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)")
	{
		document.getElementById('cell').style.margin = "-1015px auto auto -472px";
	}
	
}


function oculta(ocultar)
{
	document.getElementById(ocultar).style.display = "none";
	if(ocultar=="image")
	{
		document.getElementById(ocultar).style.display = "none";
		document.getElementById('cell').style.margin = "-538px auto auto -472px";
		if(navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion == "4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)")
		{
			document.getElementById('cell').style.margin = "-605px auto auto -472px";
		}
	}
}


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;
}

function desocultaGaleria()
{
	parent.document.body.scroll = 'no';
	parent.document.body.style.overflow = 'hidden';
	parent.document.getElementById('imgGrd').style.display = "block";
}

function ocultaGaleria()
{
	parent.document.body.scroll = 'auto';
	parent.document.body.style.overflow = 'auto';
	parent.document.getElementById('imgGrd').style.display = "none";
}