var scat='';

function swCarr(locid){document.getElementById(locid).innerHTML='<table width=100% height=100%><tr><td align=center><img src=http://www.daltech.com.br/img/dtc_ajxl.gif></td></tr></table>'}

function dIt(id){document.getElementById(id).src='http://www.daltech.com.br/img/dtc_menu_'+id+'1.gif'} function udIt(id) {document.getElementById(id).src='http://www.daltech.com.br/img/dtc_menu_'+id+'0.gif'}

function desT(tid){document.getElementById(tid).className='opc_prd_1'} function udesT(tid){document.getElementById(tid).className='opc_prd_0'}

function GetXmlHttpObject(handler){var objXmlHttp=null;if(navigator.userAgent.indexOf("Opera")>=0){alert("ERRO:AJNOPR");return}if(navigator.userAgent.indexOf("MSIE")>=0){var strName="Msxml2.XMLHTTP";if(navigator.appVersion.indexOf("MSIE 5.5")>=0){strName="Microsoft.XMLHTTP"}try{objXmlHttp=new ActiveXObject(strName);objXmlHttp.onreadystatechange=handler;return objXmlHttp}catch(e){alert("ERRO:SAXDED");return}}if(navigator.userAgent.indexOf("Mozilla")>=0){objXmlHttp=new XMLHttpRequest();objXmlHttp.onload=handler;objXmlHttp.onerror=handler;return objXmlHttp}} 

function desconvertUtf(strconverted){if (strconverted.length>0){var strdesconverted = '';var tabcon = '&Agrave;,&Aacute;,&Acirc;,&Atilde;,&Auml;,&Aring;,&AElig;,&Ccedil;,&Egrave;,&Eacute;,&Ecirc;,&Euml;,&Igrave;,&Iacute;,&Icirc;,&Iuml;,&ETH;,&Ntilde;,&Ograve;,&Oacute;,&Ocirc;,&Otilde;,&Ouml;,&times;,&Oslash;,&Ugrave;,&Uacute;,&Ucirc;,&Uuml;,&Yacute;,&THORN;,&szlig;,&agrave;,&aacute;,&acirc;,&atilde;,&auml;,&aring;,&aelig;,&ccedil;,&egrave;,&eacute;,&ecirc;,&euml;,&igrave;,&iacute;,&icirc;,&iuml;,&eth;,&ntilde;,&ograve;,&oacute;,&ocirc;,&otilde;,&ouml;,&divide;,&oslash;,&ugrave;,&uacute;,&ucirc;,&uuml;,&yacute;,&thorn;,&yuml;'; var splitabcon=tabcon.split(",");strdesconverted = strconverted; for (z=0;z<=63;z++){var regEx = new RegExp (splitabcon[z], 'g');strdesconverted=strdesconverted.replace(regEx,String.fromCharCode(z+192))}return strdesconverted}else{return ''}}

function include_dom(script_filename){var html_doc=document.getElementsByTagName('head').item(0); var js=document.createElement('script'); js.setAttribute('language', 'javascript'); js.setAttribute('type', 'text/javascript'); js.setAttribute('src', script_filename); html_doc.appendChild(js); return false}

function hdLpop(){document.getElementById('lpopup').style.display='none';document.getElementById('sombra').style.display='none'}

function swLpop(pagina){swSmbr();var url=pagina+"?ID="+Math.random()+"&O=LPAG"; xmlHttp=GetXmlHttpObject(stCh_swlpop);xmlHttp.open("GET", url , true);xmlHttp.send(null)}

function stCh_swlpop(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){var rsp=xmlHttp.responseText;document.getElementById('lpopup').innerHTML=rsp;document.getElementById('lpopup').style.display='block';document.getElementById('lpopup').style.left=parseInt((document.body.clientWidth-document.getElementById('lpopup').offsetWidth)/2);document.getElementById('lpopup').style.top=parseInt((document.body.clientHeight-document.getElementById('lpopup').offsetHeight)/2)}}

function swHtml(htmlloc,htmlcod) {document.getElementById(htmlloc).innerHTML=htmlcod}

function swPop(){document.getElementById('crmpop').style.display='block'; document.getElementById('crmpop').style.left=parseInt((document.body.clientWidth-document.getElementById('crmpop').offsetWidth)/2)+document.body.scrollLeft;document.getElementById('crmpop').style.top=parseInt((document.body.clientHeight-document.getElementById('crmpop').offsetHeight)/2)+document.body.scrollTop;window.onresize=centPop;document.onmousedown=MoveInit; document.onmouseup=Function("MoveEnabled=false")} function hdPop(){window.onresize=null; document.getElementById('crmpop').style.display='none'; document.getElementById('crmpop').innerHTML=''; document.onmousedown=null;document.onmouseup=null;hidSmbr()}

function centPop(){document.getElementById('crmpop').style.left=parseInt((document.body.clientWidth-document.getElementById('crmpop').offsetWidth)/2)+document.body.scrollLeft;document.getElementById('crmpop').style.top=parseInt((document.body.clientHeight-document.getElementById('crmpop').offsetHeight)/2)+document.body.scrollTop}

function MoveInit(e){topOne="BODY";whichOne=document.getElementById("crmpop");ActiveOne=event.srcElement;while(ActiveOne.id!="titleBar"&&ActiveOne.tagName!=topOne){ActiveOne=ActiveOne.parentElement}if(ActiveOne.id=="titleBar"){offsetx=event.clientX;offsety=event.clientY;nowX=parseInt(whichOne.style.left);nowY=parseInt(whichOne.style.top);MoveEnabled=true;document.onmousemove=Move}} function Move(e){if(!MoveEnabled) return;whichOne.style.left=nowX+event.clientX-offsetx;whichOne.style.top=nowY+event.clientY-offsety;return false}

function adjPop() {var delayspeed=3; if(lastX==-1||delayspeed==0){lastX=document.body.scrollLeft+floatX;lastY=document.body.scrollTop+floatY}else{var dx=Math.abs(document.body.scrollLeft+floatX-lastX);var dy=Math.abs(document.body.scrollTop+floatY-lastY);var d=Math.sqrt(dx*dx+dy*dy);var c=Math.round(d/10);if(document.body.scrollLeft+floatX>lastX){lastX=lastX+delayspeed+c}if(document.body.scrollLeft+floatX<lastX) {lastX=lastX-delayspeed-c}if(document.body.scrollTop+floatY>lastY){lastY=lastY+delayspeed+c}if(document.body.scrollTop+floatY<lastY){lastY=lastY-delayspeed-c;}}document.all['crmpop'].style.posLeft=lastX;document.all['crmpop'].style.posTop=lastY;setTimeout('adjPop()',20)}

function defPop(halign,valign){var layerwidth=document.getElementById('crmpop').offsetWidth; var layerheight=document.getElementById('crmpop').offsetHeight; if(halign=="left"){floatX=ifloatX}if(halign=="right"){floatX=document.body.offsetWidth-ifloatX-layerwidth-20}if(halign=="center"){floatX=Math.round((document.body.offsetWidth-20)/2)-Math.round(layerwidth/2)}if(valign=="top"){floatY=ifloatY}if(valign=="bottom"){floatY=document.body.offsetHeight-ifloatY-layerheight}if(valign=="center"){floatY=Math.round((document.body.offsetHeight-20)/2)-Math.round(layerheight/2)}}

function swSmbr(){if(document.getElementById('sombra')!=null) {document.getElementById('sombra').style.height=document.getElementById('tb_master').offsetHeight;document.getElementById('sombra').style.display='block'}} function hidSmbr(){if(document.getElementById('sombra')!=null) document.getElementById('sombra').style.display='none'}

function swPromo(promopage){var url="http://www.daltech.com.br/dtc_prm_"+promopage+".asp?ID="+Math.random();xmlHttp=GetXmlHttpObject(stCh_swPromo);xmlHttp.open("GET",url,true);xmlHttp.send(null)} function stCh_swPromo(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){var rsp=xmlHttp.responseText;document.getElementById('crmpop').innerHTML=rsp;swPop();setTimeout("hdPop()",100000)}}

function logIn(){swSmbr();var url="http://www.daltech.com.br/dtc_ajx.asp?ID="+Math.random()+"&O=LGP&L="+document.getElementById('Login').value+"&H="+document.getElementById('Senha').value;xmlHttp=GetXmlHttpObject(stCh_logIn);xmlHttp.open("GET",url,true);xmlHttp.send(null)} function stCh_logIn(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){var rsp=xmlHttp.responseText;location=rsp}}

function calAjxRF(pgddr,rtaddr,oper,frmids){var strids='';spltids=frmids.split(",");for(cids=0;cids<(spltids.length);cids+=1){if(document.getElementById(spltids[cids])!='')strids+=spltids[cids]+'='+escape(document.getElementById(spltids[cids]).value)+'&'}xmlHttp=GetXmlHttpObject(rtaddr);xmlHttp.open("POST",pgddr+'?ID='+Math.random()+'&O='+oper,true);xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded;charset=UTF-8");xmlHttp.setRequestHeader("Content-length", strids.length);xmlHttp.send(strids)} 

function oCa(camposString){splitString=camposString.split(",");for (x=0;x<=(splitString.length-1);x++){if(document.getElementById(splitString[x])!=null){document.getElementById(splitString[x]).style.display='none'}}} function mCa(camposString){splitString=camposString.split(",");for(x=0;x<=(splitString.length-1);x++){if(document.getElementById(splitString[x])!=null){document.getElementById(splitString[x]).style.display='inline'}}}

function altNot(not)
{
switch(not)
	{
	case 5:oCa('not_4,not_3,not_2,not_1');mCa('not_5');setTimeout("altNot(1)",5000);break
	case 4:oCa('not_5,not_3,not_2,not_1');mCa('not_4');setTimeout("altNot(5)",5000);break
	case 3:oCa('not_5,not_4,not_2,not_1');mCa('not_3');setTimeout("altNot(4)",5000);break
	case 2:oCa('not_5,not_4,not_3,not_1');mCa('not_2');setTimeout("altNot(3)",5000);break
	case 1:oCa('not_5,not_4,not_3,not_2');mCa('not_1');setTimeout("altNot(2)",5000);break
	}
}
