/*
function CarrecaStyle(codigo_canal){
		//alert(codigo_canal)
		if (codigo_canal == "16"){
			//SUNDOWN
			//document.getElementById("canaisespeciais").style.backgroundColor= "#D7F7F4";
			document.getElementById("canaisespeciais").style.fontSize		= "9px";
			document.getElementById("canaisespeciais").style.width			= "151px";
		}else if (codigo_canal == "17"){
			//JONTEX
			//document.getElementById("canaisespeciais").style.backgroundColor= "#90cffc";
			//document.getElementById("canaisespeciais").style.fontSize		= "10px";
			document.getElementById("canaisespeciais").style.width			= "168px";
		}else if (codigo_canal == "18"){
			//CUIDAR
			document.getElementById("canaisespeciais").style.backgroundColor= "#7fd4fa";
			document.getElementById("canaisespeciais").style.fontSize		= "11px";
			document.getElementById("canaisespeciais").style.width			= "155px";			
		}else if (codigo_canal == "19"){
			//OB
			document.getElementById("canaisespeciais").style.backgroundColor= "#D7F7F4";
			document.getElementById("canaisespeciais").style.fontSize		= "11px";
			document.getElementById("canaisespeciais").style.width			= "142px";			
		}else if (codigo_canal == "20"){
			//MASSÊ
			document.getElementById("canaisespeciais").style.backgroundColor= "#90cffc";
			document.getElementById("canaisespeciais").style.fontSize		= "9px";
			document.getElementById("canaisespeciais").style.width			= "165px";
		}else if (codigo_canal == "21"){
			//BAND-AID
			document.getElementById("canaisespeciais").style.backgroundColor= "#90cffc";
			document.getElementById("canaisespeciais").style.fontSize		= "10px";
			document.getElementById("canaisespeciais").style.width			= "155px";
		}else if (codigo_canal == "23"){
			//CLEAN & CLEAR
			//document.getElementById("canaisespeciais").style.backgroundColor= "#90cffc";
			document.getElementById("canaisespeciais").style.fontSize		= "10px";
			document.getElementById("canaisespeciais").style.width			= "168px";
		}else if (codigo_canal == "24"){
			//JOHNSON'S&reg; Baby
			document.getElementById("canaisespeciais").style.backgroundColor= "#90cffc";
			document.getElementById("canaisespeciais").style.fontSize		= "10px";
			document.getElementById("canaisespeciais").style.width			= "155px";
		}else if (codigo_canal == "31"){
			//JOHNSON´S&reg; Crescidinhos
			document.getElementById("canaisespeciais").style.backgroundColor= "#90cffc";
			document.getElementById("canaisespeciais").style.fontSize		= "10px";
			document.getElementById("canaisespeciais").style.width			= "155px";
		}else if (codigo_canal == "32"){
			//K-Y
			document.getElementById("canaisespeciais").style.backgroundColor= "#90cffc";
			document.getElementById("canaisespeciais").style.fontSize		= "10px";
			document.getElementById("canaisespeciais").style.width			= "155px";
		}else if (codigo_canal == "27"){
			//NEUTROGENA
			document.getElementById("canaisespeciais").style.backgroundColor= "#90cffc";
			document.getElementById("canaisespeciais").style.fontSize		= "10px";
			document.getElementById("canaisespeciais").style.width			= "155px";
		}else if (codigo_canal == "29"){
			//SEMPRE LIVRE
			document.getElementById("canaisespeciais").style.backgroundColor= "#90cffc";
			document.getElementById("canaisespeciais").style.fontSize		= "10px";
			document.getElementById("canaisespeciais").style.width			= "155px";
		}

	}
	//#######################################################################################
	//antigas funções de redirecionamento.
	
	imgLink = new Array();
	imgLink[0] = 'javascript:abrePopup("/gol_de_letra/index.htm", 792, 490)'
	imgLink[1] = '/sundown/'
	imgLink[2] = '/firstaid/'
	imgLink[3] = '/jontex/'
	imgLink[5] = '/ob/'
	imgLink[6] = '/masse/'
	imgLink[7] = '/band-aid/'
	imgLink[8] = '/cleanclear/'
	imgLink[9] = '/johnsonsbaby/'
	imgLink[10] = '/JohnsonsCrescidinhos/'
	imgLink[11] = '/ky/'
	imgLink[12] = '/neutrogena/'
	imgLink[13] = '/semprelivre/'
	imgLink[14] = '/tylenol/'

	function fui2(){

		j = document.forms['cespecial'].especial.value;
		
		if (j != "#"){
			for(i = 0 ; i < 15 ; i++){
				if (imgLink[i] == j){
					top.location.href = j;	
				}
			}
		}
	}
	//#########################################################################################
*/	
	function fui2(){

		j = document.forms['cespecial'].especial.value;
		if (j != "#"){
			top.location.href = j;	
		}
	}	
	
	function newAjaxObject(){
		var objAjax;

		try{
			objAjax = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(e){
			try {
				objAjax = new ActiveXObject("Msxml2.XMLHTTP");
				objAjax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
			}
			catch(ex){
				try{
					objAjax = new XMLHttpRequest();
				}
				catch(exc){
					objAjax = null;
				}
			}
		}
		return objAjax;
	}

	function RunAjaxRequest(stMethod, stUrl, stParameters, stPosFunctionName){
		
		objXmlRequest = newAjaxObject()
		process       = stPosFunctionName;

		objXmlRequest.onreadystatechange = function(){
			try{
				process(objXmlRequest);
			}
			catch(objException){
			}
		}

		if (!stMethod) {
			stMethod = "POST";
		}

		stMethod = stMethod.toUpperCase();

		objXmlRequest.open(stMethod, stUrl, true);

		if (stMethod == "POST") {
			//objXmlRequest.setRequestHeader("Connection", "close");
			objXmlRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
			objXmlRequest.setRequestHeader("Method", "POST" + stUrl + "HTTP/1.1");
			
		}

		objXmlRequest.send(stParameters);
		return objXmlRequest;
	}
	
	function limpaString(str){
	
		str = str.replace("http://triboserverweb:91", "http://triboserverweb:94");
		str = str.replace("http://www.jnjbrasil.com.br", "");						
		str = str.replace("http://desenv-jnjbrasil.ncsbr.jnj.com", "");
		str = str.replace("http://aceite-jnjbrasil.ncsbr.jnj.com", "");

	    return str;
	}	
	
	function trataXmlCbox(objXmlRequest){	
		if(objXmlRequest.readyState == 4){			
			if (objXmlRequest.status == 200){
				
				var stValorCampo;
				var stCampo;

				nmTotalResults 	= objXmlRequest.responseXML.getElementsByTagName("Canais").length
				objXml 			= objXmlRequest.responseXML

				//alert(objXmlRequest.responseText);
				//alert(nmTotalResults);

				listBoxCampo			    = document.getElementById("canaisespeciais");
				listBoxCampo.options.length = 0;

				if(nmTotalResults > 0){
					listBoxCampo.options[listBoxCampo.options.length] = new Option("escolha aqui","#");
					for(i = 0 ; i < nmTotalResults ; i++){

						stCampo      = (objXml.getElementsByTagName("CanalNome")[i].firstChild.nodeValue)
						stValorCampo = (objXml.getElementsByTagName("CanalDiretorio")[i].firstChild.nodeValue)
						stValorCampo = limpaString(stValorCampo);

						//alert(stCampo+'|'+stValorCampo);

						listBoxCampo.options[listBoxCampo.options.length] = new Option(stCampo,stValorCampo);
					}
				}
			}
		}
	}