function ml(str, op){
	var key = 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890-_.@';
	var temp = '';
	var j = Math.round(str.length / 2)
	for (var i = 0; i < str.length; i++){
		var k = key.indexOf(str.charAt(i));
		temp += k >= 0 ? key.charAt((66 + k - j) % 66) : str.charAt(i);
		j++;
	}
	if (op == 1) location.href = 'mailto:' + temp;
	else document.writeln(temp);
}
function ShowFoto(img){
	var foto1= new Image();
	var sc = 0;
	if (img.src.indexOf('sc_shadow.gif') > 0) return;
	if (img.src.indexOf('sc_v') > 0) {sc = 1; foto1.src = img.src.replace(/s.gif$/, '.gif');
		if (img.src.indexOf('sc_v107') > 0){
			foto1.width = 360; foto1.height = 277;
		}
		else {
			foto1.width = 400; foto1.height = 277;
		}
	}
	else foto1.src = img.src;
	if(sc || (foto1.width != 0)&&(foto1.height != 0) && (foto1.width > img.width || foto1.height != img.height)){
		width=foto1.width;
		height=foto1.height;
		var scroll = '';
		if (width > screen.width) {width = screen.width; scroll = ',scrollbars=yes';}
		if (height > (screen.height - 80)) {height = screen.height - 80; scroll = ',scrollbars=yes';}
		size="width="+width+",height="+height+scroll+", resizeable=yes, status=no"
		newwin=window.open('',"",size);
		newwin.document.title = img.alt ? 'Sypex: ' + img.alt : 'Sypex';
		newwin.document.body.style.margin = '0px';
		newwin.document.body.innerHTML = '<DIV STYLE="width: 100%; height: 100%; overflow: auto;"><IMG SRC=' + foto1.src + '></DIV>';
	}
}

function CheckFoto(img){
	var foto1= new Image();
	foto1.src = img.src;
	if((foto1.width != 0)&&(foto1.height != 0) && (foto1.width > img.width || foto1.height != img.height)){
		img.style.cursor = 'pointer';
	}
}
