// JavaScript Document
function Dados(Valor, Altura)
{
	//alert(Valor);
	//document.getElementById("contato").src=Valor;
	//document.getElementById("contato").height=700;
	window.open(Valor, "_self");
}
function MM_openBrWindow(theURL,winName,features,Scroll) { //v2.0
  window.open(theURL,winName,features);
}
function EnviaVal(pag)
{
	window.open(pag, "_self");
}
function CheckTipo()
{
	var msg=0;
	if(msg==0)
		if(document.getElementById("Nome").value==null || document.getElementById("Nome").value.length<3)
			msg="Coloque o nome do tipo do tecido";
			
	if(msg==0)
		if(!document.tipos.Ativo[0].checked && !document.tipos.Ativo[1].checked)
			msg="Defina o status do tecido";	
			
	if(msg==0)
		return true;
	else
	{
		alert(msg);
		return false;
	}
}
function CheckColec()
{
	var msg=0;
	if(msg==0)
		if(document.getElementById("Nome").value==null || document.getElementById("Nome").value.length<3)
			msg="Coloque o nome da colecao";
	
	if(msg==0)
		if(!document.colecao.Lancamento[0].checked && !document.colecao.Lancamento[1].checked)
			msg="Defina o status do colecao";	

	if(msg==0)
		if(!document.colecao.Ativo[0].checked && !document.colecao.Ativo[1].checked)
			msg="Defina o status de ativacao";	
			
	if(msg==0)
		return true;
	else
	{
		alert(msg);
		return false;
	}
}
function CheckTecido()
{
	var msg = 0;

	if(msg == 0)
		if(document.getElementById("listColecao").value==0)
			msg="Escolha a coleção";
	
	if(msg == 0)
		if(document.getElementById("Ref").value==null || document.getElementById("Ref").value.length<10)
			msg="Coloque a referência";
	
	/*if(msg == 0)
		if(document.tecido.Tecido.value==null || document.tecido.Tecido.value.length<5)
			msg="Escolha a imagem do tecido";
	*/
	if(msg==0)
		if(!document.tecido.Ativo[0].checked && !document.tecido.Ativo[1].checked)
			msg="Defina o status de ativacao";	
			
	if(msg==0)
		return true;
	else
	{
		alert(msg);
		return false;
	}				
}
function abreM(url,janela,scroll){
W = eval(screen.width)-10;
H = eval(screen.height)-54;

window.open(url,janela,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no ,resizable=no fullscreen=yes,copyhistory=no,width="+W+",height="+H+",top=0,left=0");
}

function revista() {
  myWin= open("revista/edicao4", "displayWindow", 
    "width=950,height=620,status=no,toolbar=no,menubar=no,scrollbars=no");
        }
		
function fale() {
  myWin= open("http://www.dcweb.com.br/donatelli/fale_conosco.php", "displayWindow", 
    "width=500,height=406,status=no,toolbar=no,menubar=no,scrollbars=no");
        }

function Paginas(Valor)
{
	document.getElementById('tecidos').src = Valor;
}
