

function changeImg(object,path){
	object.src = path;
}

function change_image(img1)
   {
      window.parent.frames['left'].contentDocument.images['kanji'].src = img1;
   }
function change_Frame(left_frame, main_frame){
	parent.left.location.href = left_frame; 
	parent.main.location.href =  main_frame; 
}

function setVisibility(obj){
//	alert(document.getElementById("contab").style.visibility);

	var vis = document.getElementById(obj).style.display;
	if( vis == 'none'){
		document.getElementById(obj).style.display= 'block';
	}else{
		document.getElementById(obj).style.display= 'none';
		
	}
	
}

function setDisplay(obj,dis){

	document.getElementById(obj).style.display = dis;
}

 function popup(pagina) {
	var w = 600;
	var h = 300;
	var l = Math.floor((screen.width-w)/2);
	var t = Math.floor((screen.height-h)/2);
	window.open(pagina,"","width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + "scrollbar=yes");
    
 }
 
 function popupImg(obj,img) {
	var w = document.getElementById(obj).larghezza;
	var h = document.getElementById(obj).altezza;
	if(screen.width < w)
		w = screen.width;
	if(screen.height < h)
		h = screen.height;	
	var l = Math.floor((screen.width-w)/2);
	var t = Math.floor((screen.height-h)/2);
	window.open(img,"","width=" + w + ",height=" + h + ",top="+t+",left="+l+",scrollbar=yes");

    
 }


function changeColor(color,id){
	document.getElementById(id).style.color = color;
}


function popup_photo(pagina) {
	//var w = getImageWidth(src.id)
	//	var h = getImageHeight(src.id);
		var newImg = new Image();
        newImg.src = pagina;
    //    alert(pagina)

        var height = newImg.height;
        var width = newImg.width
	var l = Math.floor((screen.width-width )/2);
	var t = Math.floor((screen.height-height )/2);
	window.open(newImg.src,"","width=" + width + ",height=" + height + ",top=" + t + ",left=" + l + "scrollbar=yes");
    
 }
 function getImageWidth(myImage) {
	var x, obj;
	if (document.layers) {
		var img = getImage(myImage);
		return img.width;
	} else {
		return getElementWidth(myImage);
	}
	return -1;
}

function getImageHeight(myImage) {
	var y, obj;
	if (document.layers) {
		var img = getImage(myImage);
		return img.height;
	} else {
		return getElementHeight(myImage);
	}
	return -1;
}



