function trim(vString){
    return vString.replace(/^\s+|\s+$/ig, '');
}
 
function clickInText(obj){
    var valorinicial = trim(obj.getAttribute('valorInicial'));
    if ( trim(obj.value) == valorinicial ) {
        obj.value = '';     
    }
}
 
function clickOutText(obj){
    var valorinicial = trim(obj.getAttribute('valorInicial'));
    if ( trim(obj.value) == '' ) {
        obj.value = valorinicial;     
    }
}
 
function clickInPass(obj1, obj2){
    var valorinicial = trim(obj1.getAttribute('valorInicial'));
    if ( trim(obj1.value) == valorinicial ) {
        obj1.style.display = 'none';
        obj2.style.display = 'inline';
        obj2.value = '';
        obj2.focus();
    }
}
 
function clickOutPass(obj1, obj2){
    var valorinicial = trim(obj1.getAttribute('valorInicial'));
    if ( trim(obj2.value) == '' ) {
        obj2.style.display = 'none';
        obj1.value = valorinicial;
        obj1.style.display = 'inline';
    }
}


function AbrePop(pagina,pgNome,largura,altura){
    centroLeft = (screen.width / 2) - (largura / 2);
    centroTop = (screen.height / 2) - (altura / 2);
    pop=window.open(pagina, pgNome, "width=" + largura + " ,height=" + altura + " ,top=" + centroTop + " ,left=" + centroLeft + ",scrollbars=no");
    pop.focus();
}	      

function expandeDiv(pDiv, pAlturaDiv, pValorExpande){
    
	valorExpande = parseInt(pAlturaDiv + pValorExpande);        
    document.getElementById(pDiv).style.height = valorExpande + 'px';
	
}

function contraiDiv(pDiv, pAlturaDiv){
    
    document.getElementById(pDiv).style.height = pAlturaDiv + 'px';

}


function visitaVirtualSeleciona(pSelecao){
	location.href=pSelecao;
}

function VerificaBuscaProdutos(){
	
	var intValue, strHttp;

	intValue = ddlBuscaProdutos.value;
	strHttp = '/neutrogena/dermatologistas/'

	if(intValue == 0 ){
		alert('Por favor selcione o produto.');
		return(false);
	}else{
		strLink = new Array();
		strLink[1] = strHttp + 'produtosInterna.asp?produtoid=471';
		strLink[2] = strHttp + 'produtosInterna.asp?produtoid=107';
		strLink[3] = strHttp + 'produtosInterna.asp?produtoid=100';
		strLink[4] = strHttp + 'produtosInterna.asp?produtoid=191';
		strLink[5] = strHttp + 'produtosInterna.asp?produtoid=634';
		strLink[6] = strHttp + 'produtosInterna.asp?produtoid=683';
		strLink[7] = strHttp + 'produtosInterna.asp?produtoid=692';
		strLink[8] = strHttp + 'produtosInterna.asp?produtoid=693';
		strLink[9] = strHttp + 'produtosInterna.asp?produtoid=638';

		location = strLink[intValue];

	}
return(true);
}



