var currentsub = "contactWin";

function MM_findObj(n, d) { //v3.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); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

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 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 DocPopUp(url,x,y){
	var doc = window.open(url,"docpopup","width="+x+",height="+y+",left=100,top=50,screenX=100,screenY=50,scrollbars=yes,location=no,menubar=no,toolbar=no,status=no,resizable=no");
}

function ImgPopUp(file, name) {
	var doc = window.open('','imgpopup','scrollbars=auto,status=no,toolbar=no,location=no,directories=no,resizeable=no,left=0,top=0,screenX=0,screenY=0,width=1,height=1');
	doc.document.writeln('<html>\n<head>\n<title> '+name+' </title>\n<script language="javascript">');
	doc.document.writeln('<'+'!-- \nfunction resize() {\n var i=50;\n if (document.images[0]) {window.resizeTo(document.images[0].width+i, document.images[0].height+(i*1.4)); self.moveTo((screen.width-document.images[0].width)/2.2,(screen.height-document.images[0].height)/4) }\nself.focus();\n}\n/'+'/--'+'>');
	doc.document.writeln('</script></head><body bgcolor="#000000" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" onLoad="resize();">');
	doc.document.writeln('<center>\n<br><img src="images/'+file+'" alt="'+name+'" border="1">\n</center></body>\n</html>');
    doc.document.close();
}

function updateSub(which){
	MM_showHideLayers(currentsub,'','hide',which,'','show');
	currentsub = which;
}

function fview(name,movie,x,y) {
	y	 = y+16; <!-- for controller -->
	winX = x*1.5;
	winY = y*1.75;
	Left = (screen.width) ? (screen.width-winX)/2 : 0;
	Top  = (screen.height) ? (screen.height-winY)/2.5 : 0;
	
	var header = '<html>\n<head><title> '+name+' </title></head>\n';
	var win = window.open('','popup','scrollbars=no,status=no,toolbar=no,location=no,directories=no,resizeable=no,top='+Top+',left='+Left+',width='+winX+',height='+winY);
	win.document.write(header);
	win.document.write('<body bgcolor="black" text="gray" link="gray" vlink="gray">\n<table width="100%" height="100%"><tr><td>\n<center>\n');
	win.document.write('<font face="Arial, geneva, helvetica, san-serif" size="2"><h4>'+name+'</h4>\n');
	win.document.write('<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="'+x+'" HEIGHT="'+y+'" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">\n<PARAM name="SRC" VALUE="'+movie+'">\n<PARAM name="AUTOPLAY" VALUE="true">\n<PARAM name="CONTROLLER" VALUE="true">\n<PARAM name="TARGET" VALUE="myself">\n');
	win.document.write('<embed src="'+movie+'" width='+x+' height='+y+' controller="true" pluginspage="http://www.apple.com/quicktime/download/" bgcolor="black">\n</object>\n');
	win.document.write('<p><br><small><a href="javascript:window.close();">Close Window</a></small></font>\n');
	win.document.write('</center>\n</td></tr></table>\n</body>\n</html>');
    win.document.close();
}

function view(name,movie,x,y,format) {
	winX = x*1.5;
	winY = y*1.75;
	Left = (screen.width) ? (screen.width-winX)/2 : 0;
	Top  = (screen.height) ? (screen.height-winY)/2.5 : 0;
	var header = '<html>\n<head><title> '+name+' </title></head>\n';
	var win = window.open('','popup','scrollbars=no,status=no,toolbar=no,location=no,directories=no,resizeable=no,top='+Top+',left='+Left+',width='+winX+',height='+winY);
	win.document.write(header);
	win.document.write('<body bgcolor="black" text="gray" link="gray" vlink="gray">\n<table width="100%" height="100%"><tr><td>\n<center>\n');
	win.document.write('<font face="Arial, geneva, helvetica, san-serif" size="2"><h4>'+name+'</h4>\n');
	if (format=='qt'){
		y = y+16; <!-- for controller -->
		win.document.write('<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="'+x+'" HEIGHT="'+y+'" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">\n<PARAM name="SRC" VALUE="'+movie+'">\n<PARAM name="AUTOPLAY" VALUE="true">\n<PARAM name="CONTROLLER" VALUE="true">\n<PARAM name="TARGET" VALUE="myself">\n<embed src="'+movie+'" width='+x+' height='+y+' controller="true" pluginspage="http://www.apple.com/quicktime/download/" bgcolor="black">\n</object>\n');
	} else {
		y = y+40; <!-- for controller -->
		win.document.write('<OBJECT CLASSID="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95" WIDTH="'+x+'" HEIGHT="'+y+'" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" id="MediaPlayer" type="application/x-oleobject">\n<PARAM name="SRC" VALUE="'+movie+'">\n<PARAM name="AUTOPLAY" VALUE="true">\n<PARAM name="CONTROLLER" VALUE="true">\n<PARAM name="TARGET" VALUE="myself">\n<embed src="'+movie+'" width='+x+' height='+y+' type="application/x-mplayer2" controller="true" pluginspage="http://www.microsoft.com/windows/windowsmedia/" bgcolor="black">\n</object>\n');
	}
	win.document.write('<p><br><small><a href="javascript:window.close();">Close Window</a></small></font>\n');
	win.document.write('</center>\n</td></tr></table>\n</body>\n</html>');
    win.document.close();
}

function trans() {
	var URL = location.href;
	if  (location.href.indexOf ("babelfish.altavista.com")==-1){
		document.write("<Map name=translate_eng >");
		document.write("<AREA COORDS=17,115,42,130 SHAPE=rect href='http://babelfish.altavista.com/babelfish/tr?doit=done&url="+URL+"&lp=en_es' alt='Para traducir esta página' target=translate>");
		document.write("<AREA COORDS=49,115,74,130 SHAPE=rect href='http://babelfish.altavista.com/babelfish/tr?doit=done&url="+URL+"&lp=en_pt' alt='Para traduzir esta página' target=translate>");
		document.write("<AREA COORDS=49,95,74,110 SHAPE=rect href='http://babelfish.altavista.com/babelfish/tr?doit=done&url="+URL+"&lp=en_it' alt='Per tradurre questa pagina' target=translate>");
		document.write("<AREA COORDS=17,95,42,110 SHAPE=rect href='http://babelfish.altavista.com/babelfish/tr?doit=done&url="+URL+"&lp=en_fr' alt='Pour traduire cette page' target=translate>");
		document.write("<AREA COORDS=49,74,74,89 SHAPE=rect href='http://babelfish.altavista.com/babelfish/tr?doit=done&url="+URL+"&lp=en_ko' alt='To translate to Korean' target=translate>");
		document.write("<AREA COORDS=17,74,42,89 SHAPE=rect href='http://babelfish.altavista.com/babelfish/tr?doit=done&url="+URL+"&lp=en_ja' alt='To translate to Japanese' target=translate>");
		document.write("<AREA COORDS=49,53,74,68 SHAPE=rect href='http://babelfish.altavista.com/babelfish/tr?doit=done&url="+URL+"&lp=en_de' alt='Diese Seite übersetzen' target=translate>");
		document.write("<AREA COORDS=17,53,42,68 SHAPE=rect href='http://babelfish.altavista.com/babelfish/tr?doit=done&url="+URL+"&lp=en_zh' alt='To translate to Chinese' target=translate>");
		document.write("<AREA COORDS=0,0,90,28 SHAPE=rect href='http://babelfish.altavista.com' target=translate>");
		document.write("</Map>");
		document.write("<img src=http://www.hyperharp.com/images/babelfish.gif usemap=#translate_eng border=0 hspace=7 alt='Babel Fish Translation'>")
	} else {
		document.write();
	}
}