inicio = 0;

function initPage(){
	inicio = 1;
}

function rollover(imgName,st,imgSrc,alt){
	if(inicio!=0){
		if(!imgSrc){imgSrc = imgName}
		if(contactPag){
			document.images[imgName].src = "images/bt_" + imgSrc + "_" + st + ".gif"
		}else{
			document.images[imgName].src = "../images/bt_" + imgSrc + "_" + st + ".gif"
		}
		if(alt){
			if(st == "ov"){Alt.write('<img src="../images/pix_trans.gif" width=9 height=9><br><span class=alt>' + alt + '<br></span>');Box.show();}else{Box.hide();}
		}
	}
}

function fullSize(imgsrc){
	nw = window.open('about:','nw','width=340,height=280')
	nw.document.location = imgsrc
	nw.focus();
}

function rollbullet(imgName,st){
	if(inicio!=0){
		sr = document.images[imgName].src
		sr = sr.split('_')[1]
		document.images[imgName].src = "../images/bt_" + sr + "_" + st + ".gif"
	}
}

function downCatalogo(catalogo){
	window.open('downcatalogo.asp?id=' + catalogo,'catalogo','width=400,height=390,top=100,left=100')
}

function solicitudCatalogo(ide){
	window.open('solicitudcatalogo.asp?id=' + ide,'catalogo','width=400,height=520,top=100,left=100')
}

function openTech(id){
	window.open('desctec.asp?id=' + id,'tecnologia','width=520,height=440,top=100,left=100,scrollBars=1')
}


var fwindow;

function openPicture(foto){
	fwindow = window.open('../blank.htm','fwindow','width=10,height=10')
	wSize = new Image()
	wSize.src = '../images/prods/' + foto + '_b.jpg'
	download(wSize)
}

function download(img){
	tImg = img
	if(tImg.complete){
		fwindow.resizeTo(img.width,img.height)
		fwindow.document.write(generatePic(tImg))
	}
	else{
		setTimeout('download(tImg)',100);
	}
}

function generatePic(img) {
	fotoGran = '<html><head><title>Mitsubishi Electric</title><script>window.focus();<' + '/' +'script></head><body bgcolor=white background="' + img.src + '">'
				+''
				+'</body></html>'
	return fotoGran;
}

function openGlos(i,st){
	if(inicio!=0){
		if(st == 1){
			temp = ''
			desc = glosario[i][1]
			if(desc.indexOf("##") >= 0){
				desc = desc.split("##")
				if(desc[0].length > 1){
					temp = desc[0] + '<br>'
				}
				temp += '<i>Viene de ' + eval(desc[1])[0] + '</i><br>'
				temp += eval(desc[1])[1]
				desc = temp
			}
			answer.write('<span class="rp_tit">' + glosario[i][0] + '</span><br><span class="rp">' + desc + '</span>')
			answer.show();
		}else{
			answer.hide();
		}
	}
}
