function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function printit(){  
if (navigator.appName == "Netscape") {
    window.print() ;  
} else {
    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
    WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = "";  
}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function tmt_findObj(n){
	var x,t; if((n.indexOf("?"))>0&&parent.frames.length){t=n.split("?");
	x=eval("parent.frames['"+t[1]+"'].document.getElementById('"+t[0]+"')");
	}else{x=document.getElementById(n)}return x;
}

function tmt_divBoxOut(tl,dur,incr) {
	var nn4=(document.layers)?true:false;transNo=parseInt(1);arHidden=new Array(1,3,14,16);
	var t=(document.getElementById)?tmt_findObj(tl):MM_findObj(tl);
	if(document.all&&t){t.style.filter="revealTrans(duration="+dur+",transition=1)";endState="hidden";
	for(i=0;i<arHidden.length;i++){if(arHidden[i]==transNo){endState="visible";t.style.visibility="hidden";}}
    t.filters.revealTrans.apply();t.style.visibility=endState;t.filters.revealTrans.play();return;}
	if(navigator.appName=='Netscape'&&t){intval=100;if(incr==0){if(nn4){t.origLeft=t.Left=t.clip.left;
	t.origTop=t.Top=t.clip.top;t.origRight=t.Right=t.clip.right;t.origBottom=t.Bottom=t.clip.bottom;
	t.Width=t.clip.width;t.Height=t.clip.height;}else{t.style.overflow='hidden';
	t.Left=t.origLeft=t.Top=t.origTop=0;t.Right=t.Width=t.offsetWidth;t.Bottom=t.Height=t.offsetHeight;}
	mSecs=dur*1000;visits=(mSecs/intval);fullW=t.Width;fullH=t.Height;halfW=fullW/2;halfH=fullH/2;
	alternateW=alternateH=true;incW=halfW/visits;incrementW=(incW>=1)?parseInt(incW):0;
	xtraPixW=Math.round((incW-incrementW)*visits);incH=halfH/visits;incrementH=(incH>=1)?parseInt(incH):0;
	xtraPixH=Math.round((incH-incrementH)*visits);t.Left+=halfW;t.Right-=halfW;t.Top+=halfH;t.Bottom-=halfH;
    if(nn4){t.clip.left=t.Left;t.clip.right=t.Right;t.clip.top=t.Top;t.clip.bottom=t.Bottom;t.visibility="show";}else{
	t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";
	t.style.visibility='visible';}if((t.Left-t.origLeft)<=incrementW){
	if(nn4){t.clip.left=t.origLeft;t.clip.right=t.origRight;}else{
	t.style.clip="rect("+t.Top+"px auto "+t.Bottom+"px auto)";}}
	else{if(xtraPixW>0){if(xtraPixW<=visits){if(alternateW){t.Left--;t.Right++;
	if(nn4){t.clip.left=t.Left;t.clip.right=t.Right;}else{
    t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
    xtraPixW--;}alternateW=!alternateW;}else{t.Left--;t.Right++;
	if(nn4){t.clip.left=t.Left;t.clip.right=t.Right;}else{
	t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
	xtraPixW--;}}}t.Left-=incrementW;t.Right+=incrementW;
    if(nn4){t.clip.left=t.Left;t.clip.right=t.Right;}else{
	t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
    if((t.Top-t.origTop)<=incrementH){
    if(nn4){t.clip.top=t.origTop;t.clip.bottom=t.origBottom;}else{
    t.style.clip="rect(auto "+t.Right+"px auto"+t.Left+"px)";}}else{
    if(xtraPixH>0){if(xtraPixH<=visits){if(alternateH){t.Top--;t.Bottom++;
	if(nn4){t.clip.top=t.Top;t.clip.bottom=t.Bottom;}else{
	t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
	xtraPixH--;}alternateH=!alternateH;}else{t.Top--;t.Bottom++;
	if(nn4){t.clip.top=t.Top;t.clip.bottom=t.Bottom;}else{
	t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
	xtraPixH--;}}}t.Top-=incrementH;t.Bottom+=incrementH;
	if(nn4){t.clip.top=t.Top;t.clip.bottom=t.Bottom;}else{
	t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
	visits--;}else{if((t.Left-t.origLeft)<=incrementW){
	if(nn4){t.clip.left=t.origLeft;t.clip.right=t.origRight;}else{
	t.style.clip="rect("+t.Top+"px auto "+t.Bottom+"px auto)";}}else{
	if(xtraPixW>0){if(xtraPixW<=visits){if(alternateW){t.Left--;t.Right++;
	if(nn4){t.clip.left=t.Left;t.clip.right=t.Right;}else{
	t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
	xtraPixW--;}alternateW=!alternateW;}else{t.Left--;t.Right++;
	if(nn4){t.clip.left=t.Left;t.clip.right=t.Right;}else{
	t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
	xtraPixW--;}}}t.Left-=incrementW;t.Right+=incrementW;
    if(nn4){t.clip.left=t.Left;t.clip.right=t.Right;}else{
    t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
    if((t.Top-t.origTop)<=incrementH){
	if(nn4){t.clip.top=t.origTop;t.clip.bottom=t.origBottom;}else{
	t.style.clip="rect(auto "+t.Right+"px auto "+t.Left+"px)";}}else{
	if(xtraPixH>0){if(xtraPixH<=visits){if(alternateH){t.Top--;t.Bottom++;
	if(nn4){t.clip.top=t.Top;t.clip.bottom=t.Bottom;}else{
	t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
	xtraPixH--;}alternateH=!alternateH;}else{t.Top--;t.Bottom++;
	if(nn4){t.clip.top=t.Top;t.clip.bottom=t.Bottom;}else{
	t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}
	xtraPixH--;}}}t.Top-=incrementH;t.Bottom+=incrementH;
    if(nn4){t.clip.top=t.Top;t.clip.bottom=t.Bottom;}else{
    t.style.clip="rect("+t.Top+"px "+t.Right+"px "+t.Bottom+"px "+t.Left+"px)";}visits--;}
	if(t.Left<=t.origLeft&&t.Top<=t.origTop){
	if(nn4){t.clip.left=t.origLeft;t.clip.top=t.origTop;t.clip.right=t.origRight;
	t.clip.bottom=t.origBottom;}else{t.style.clip="rect(auto)";}}else{
	setTimeout('tmt_divBoxOut("'+tl+'",'+dur+',1)',intval);}}
}

function controla(){
		history.back();
		win = window.open('/carro/carro.php','carro', 'height=400,width=600,left=200,screenX=200,top=20,screenY=20,scrollbars=1,resizable');
		document.formdatos.submit();
		win.focus();
		return false;
}

function vercarro(){
		win = window.open('/carro/carro.php','carro', 'height=400,width=600,left=200,screenX=200,top=20,screenY=20,scrollbars=1,resizable');
		win.focus();
		return false;
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
  }
