//////////////////////////////////////////////////////////////////////
// Direitos Autorais sobre: startup02.js
//
// Este banco de funções é protegido pela lei de direitos autorais
// e marcas internacionais. A reprodução ou distribuição não autorizada,
// ou qualquer parte dele, resultará na imposição de rigorosas penas
// civis e criminais e os infratores serão objeto de ação judicial
// promovida na máxima extensão possível nos termos da lei.
//
// © Copyright 2002-2003, StartUp Informática Ltda.
// Todos os direitos reservados. (All rights reserved.)
//////////////////////////////////////////////////////////////////////

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_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_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 cabecalho(path, menuactive)
{
	// Necessário para o Add MSN
// Comentado em 23/08/2005, novamente porque o Sr. Thompson disse que está causando "problemas"...
//	document.writeln("<object classid=\"clsid:B69003B3-C55E-4B48-836C-BC5946FC3B28\" codetype=\"application/x-oleobject\" id=\"MsgrObj\" width=\"0\" height=\"0\"></object>");

	// Logo
	document.writeln("<p><span style=\"position: absolute; left: 40; top: 0\">");
	document.writeln("<img border=\"0\" src=\""+path+"images/logomedio.gif\" width=\"65\" height=\"78\">");
	document.writeln("</span></p>");

	// Endereço
	document.writeln("<div style=\"position: absolute; left: 140; top: 8; width: 565\">");
	document.writeln("<font face=\"verdana\" size=\"2\" color=\"#31363d\">");
	document.writeln("<b>TRADIMPEX Importa&ccedil;&atilde;o Exporta&ccedil;&atilde;o Ltda</b>");
	document.writeln("</font>");
	document.writeln("</div>");
	document.writeln("<div style=\"position: absolute; left: 140; top: 18; width: 760; height: 2\">");
	document.writeln("<hr align=\"left\" width=\"294\" noshade color=\"#b4813b\" size=\"2\">");
	document.writeln("</div>");
	document.writeln("<div style=\"position: absolute; left: 140; top: 28; width: 760\">");
	document.writeln("<font face=\"verdana\" size=\"2\" color=\"#31363d\">");
	document.writeln("<b>");
	document.writeln("Av. Pernambuco 1328 / 302 <br>");
	document.writeln("Porto Alegre - RS - Brasil - CEP: 90.240-001<br>");
	document.writeln("Tel / Fax: +55-51-3337.2890 - 3337.1945<br>");
	document.writeln("E-mail:");
	document.writeln("<a href=\"mailto:tradimpex@tradimpex.com.br\" title=\"Send mail to tradimpex@tradimpex.com.br\">");
	document.writeln("<font color=\"#0000ff\"><b>tradimpex@tradimpex.com.br</b></font>");
	document.writeln("</a><br>");
/*	document.writeln("MSN user:");
	document.writeln("<font color=\"#0000ff\"><b>tradimpex50@hotmail.com</b></font><br>");*/
// Comentado em 23/08/2005, novamente porque o Sr. Thompson disse que está causando "problemas"...
/*	document.writeln("<a href=\"#\" onclick=\"MsgrObj.AddContact(0, 'tradimpex50@hotmail.com'); return false;\" title=\"Add tradimpex50@hotmail.com to your MSN contact list\">");
	document.writeln("<font color=\"#0000ff\"><b>tradimpex50@hotmail.com</b></font>");
	document.writeln("</a><br>");*/
/*	document.writeln("Skype user:");
	document.writeln("<font color=\"#0000ff\"><b>tradimpex</b></font>");*/
// Comentado em 23/08/2005, novamente porque o Sr. Thompson disse que está causando "problemas"...
/*	document.writeln("<a href=\"callto://tradimpex\" title=\"Call to tradimpex with Skype\">");
	document.writeln("<font color=\"#0000ff\"><b>tradimpex</b></font>");
	document.writeln("</a>");*/
	document.writeln("</b>");
	document.writeln("</font>");
	document.writeln("</div>");

	// Parte das bandeiras
	document.writeln("<p><span style=\"position: absolute; left: 572; top: 0\">");
	document.writeln("<img border=\"0\" src=\""+path+"images/curve.gif\" width=\"18\" height=\"20\">");
	document.writeln("</span></p>");

	document.writeln("<div style=\"position: absolute; left: 588; top: 0; width: 410; height: 20\">");
	document.writeln("<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" height=\"100%\" bgcolor=\"#2f6090\">");
	document.writeln("<tr>");
	document.writeln("<td align=\"center\" valign=\"bottom\">");
	document.writeln("<font face=\"verdana\" size=\"1\" color=\"#ffffff\"><b>");
	oDataHora.MostraData();
	document.writeln("</b></font>");
	document.writeln("</td></tr></table>");
	document.writeln("</div>");

	document.writeln("<div style=\"position: absolute; left: 588; top: 20; width: 410; height: 80; filter: progid:DXImageTransform.Microsoft.Gradient(gradientType='0', endColorstr='#cadfef', startColorstr='#2f6090')\">");
	document.writeln("<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" height=\"100%\">");
	document.writeln("<tr>");
	document.writeln("<td align=\"center\">");
	document.writeln("<div style=\"margin-botom: -4\">");
	document.writeln("<img border=\"0\" src=\""+path+"images/flags.gif\" width=\"290\" height=\"40\">");
	document.writeln("</div>");
	document.writeln("</td></tr></table>");
	document.writeln("</div>");

//	document.writeln("<p><span style=\"position: absolute; left: 440; top: 40\">");
//	document.writeln("<img border=\"0\" src=\""+path+"images/flags.gif\" width=\"290\" height=\"40\">");
//	document.writeln("</span></p>");

	document.writeln("<div style=\"position: absolute; left: 0; top: 100; width: 1000; height: 20\">");
	document.writeln("<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" height=\"100%\" bgcolor=\"#2f6090\">");
	document.writeln("<tr><td><font face=\"verdana\" size=\"1\" color=\"#ffffff\"><b>");
	document.writeln("<div style=\"margin-left: 130\">");

	// Menu
	if(menuactive==1)
 		document.writeln("<img border=\"0\" src=\""+path+"menu/home1.gif\"  \"\">");
	else
// 		document.writeln("<a href=\"/tradimpex1/index.asp\"><img border=\"0\" src=\""+path+"menu/home.gif\"  \"\"></a>");
		document.writeln("<a href=\"/index.asp\"><img border=\"0\" src=\""+path+"menu/home.gif\" id=\"home\" onmouseover=\"MM_swapImage(\'home\',\'\',\'/menu/home1.gif\',1)\" onmouseout=\"MM_swapImgRestore()\"></a>");


//	document.writeln("|");
	document.writeln("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");

	if(menuactive==2)
 		document.writeln("<img border=\"0\" src=\""+path+"menu/prod1.gif\"  \"\">");
	else
// 		document.writeln("<a href=\"/tradimpex1/products/index.htm\"><img border=\"0\" src=\""+path+"menu/prod.gif\"  \"\"></a>");
		document.writeln("<a href=\"/products/index.htm\"><img border=\"0\" src=\""+path+"menu/prod.gif\" id=\"prod\" onmouseover=\"MM_swapImage(\'prod\',\'\',\'/menu/prod1.gif\',1)\" onmouseout=\"MM_swapImgRestore()\"></a>");

//	document.writeln("|");
	document.writeln("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");

	if(menuactive==3)
 		document.writeln("<img border=\"0\" src=\""+path+"menu/cont1.gif\"  \"\">");

	else
// 		document.writeln("<a href=\"/tradimpex1/contact/index.htm\"><img border=\"0\" src=\""+path+"menu/cont.gif\"  \"\"><\a>");
		document.writeln("<a href=\"/contact/index.htm\"><img border=\"0\" src=\""+path+"menu/cont.gif\" id=\"cont\" onmouseover=\"MM_swapImage(\'cont\',\'\',\'/menu/cont1.gif\',1)\" onmouseout=\"MM_swapImgRestore()\"></a>");

//	document.writeln("|");
	document.writeln("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");

	if(menuactive==4)
 		document.writeln("<img border=\"0\" src=\""+path+"menu/loc1.gif\"  \"\">");
	else
// 		document.writeln("<a href=\"/tradimpex1/location/index.htm\"><img border=\"0\" src=\""+path+"menu/loc.gif\"  \"\"></a>");
		document.writeln("<a href=\"/location/index.htm\"><img border=\"0\" src=\""+path+"menu/loc.gif\" id=\"loc\" onmouseover=\"MM_swapImage(\'loc\',\'\',\'/menu/loc1.gif\',1)\" onmouseout=\"MM_swapImgRestore()\"></a>");


	document.writeln("</div>");
	document.writeln("</b></font></td></tr></table>");
	document.writeln("</div>");
}

function background()
{
	document.writeln("<div style=\"position: absolute; top: 0; left: 0; width: 1000; height: "+getscreenheight()+"; z-index: -1\">");
	document.writeln("<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" height=\"100%\" bgcolor=\"#ffffff\"><tr><td></td></tr></table>");
	document.writeln("</div>");
}

var id_writelink=0;
function writeLink(link, caption, message, target, is_image, color_on, color_off)
{
	document.writeln("<a id=\"id_writelink"+id_writelink+"\" href=\""+link+"\"");
	if(target != "")
		document.writeln("target=\""+target+"\"");
	document.writeln("	onmouseover=\""+((is_image) ? "" : "showlink('id_writelink"+id_writelink+"','"+color_on+"',true);")+"return setstatus('"+message+"')\"");
	document.writeln("	onmouseout=\""+((is_image) ? "" : "showlink('id_writelink"+id_writelink+"','"+color_off+"',false);")+"clearstatus()\"");
	document.writeln(">"+caption+"</a>");
	showlink("id_writelink"+id_writelink, color_off, false);
	id_writelink++;
}


