function switchIcon(id, suf){
		document.getElementById(id).src='img/'+id+suf+'.gif';
	}
    function switchTabs(div_id, tab_id){
        document.getElementById('files').style.display='none';
        document.getElementById('images').style.display='none';
        document.getElementById('article').style.display='none';
        
        document.getElementById('files_tab').className='off';
        document.getElementById('images_tab').className='off';
        document.getElementById('article_tab').className='off';
        
        switch(div_id){
            case 'files':
                document.getElementById('files').style.display='block';
                 document.getElementById('files_tab').className='on';
            break;
            case 'images':
                document.getElementById('images').style.display='block';
                document.getElementById('images_tab').className='on';
            break;
            case 'article':
                document.getElementById('article').style.display='block';
                document.getElementById('article_tab').className='on';
            break;
        }
        
       
    }

function ShowFoto(img){
	var foto1= new Image();
	foto1.src = img.src;
	if((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"
		newwin=window.open('',"",size);
		newwin.document.title = 'Foto';
		newwin.document.body.style.margin = '0px';
		newwin.document.body.innerHTML = '<DIV STYLE="width: 100%; height: 100%; overflow: auto;"><IMG SRC=' + img.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';
	}
}
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);
}

