/* ÆË¾÷ ÇÔ¼ö °øÅë */

function commonPopup(url, target , option , e){
	var ex = null;
	try {
		ex = e || window.event;
		ex.returnValue = false;
	}catch(excp){
	}

	window.open(url,target,option);
}


/* ÅÇ : È¸¿ø°¡ÀÔ - ½Ç¸íÀÎÁõ ¹× ¾ÆÀÌÇÉ ÀÎÁõ ¼±ÅÃ */
var radioTabSelect ="1";    //È°¼ºÈ­ µÇ¾î ÀÖÀ» ÅÇ¹øÈ£
function realNameRadio(radioTab){
	if(radioTabSelect != radioTab){
		document.getElementById('radioView'+radioTabSelect).style.display = 'none';
		document.getElementById('radioView'+radioTab).style.display = '';
	    radioTabSelect = radioTab;
	}
		//alert(radioTabSelect);
}

$(function() {

/*
	$('input[type=text]').each(function(){
		var oInput = $(this);
		var oText = oInput.attr('value');
		oInput.focus(function(){
			if(oInput.attr('value') == oText){
				oInput.attr('value', '');
			}
		});
		oInput.blur(function(){
			if(oInput.attr('value') == ''){
				oInput.attr('value', oText);
			}
		});
	});
*/
	//
	$('a', '.cancer').bind('focus mouseover', function(event){
		var oImg = $(this).find('img:first');
		var oSrc = oImg.attr('src');
		oImg.attr('src', oSrc.replace('Off.gif', 'On.gif'));
	});
	$('a', '.cancer').bind('blur mouseout', function(event){
		var oImg = $(this).find('img:first');
		var oSrc = oImg.attr('src');
		oImg.attr('src', oSrc.replace('On.gif', 'Off.gif'));
	});

	$('a', '.cancerMainList').bind('focus mouseover', function(event){
		var oImg = $(this).find('img:first');
		var oSrc = oImg.attr('src');
		oImg.attr('src', oSrc.replace('Off.gif', 'On.gif'));
	});
	$('a', '.cancerMainList').bind('blur mouseout', function(event){
		var oImg = $(this).find('img:first');
		var oSrc = oImg.attr('src');
		oImg.attr('src', oSrc.replace('On.gif', 'Off.gif'));
	});
});




// ¿¬Çõ
function showHistory(n) {

	for (i=1; i<=$('#history .boxHistory').length+1; i++){

		if(i==n){
			if(document.getElementById("historyYear"+n)) document.getElementById("historyYear"+n).className = "historyYearOn";
			if(document.getElementById("historyCont"+n)) {
				document.getElementById("historyCont"+n).style.display = "";
			}

			if(document.getElementById("historyImg"+n)){
				var obj = document.getElementById("historyImg"+n)
				document.getElementById("historyImg"+n).src = obj.src.replace("Off", "On");
			}
		} else {
			if(document.getElementById("historyYear"+i)) document.getElementById("historyYear"+i).className = "historyYear";
			if(document.getElementById("historyCont"+i)) {
				document.getElementById("historyCont"+i).style.display = "none";
			}

			if(document.getElementById("historyImg"+i)){
				var obj = document.getElementById("historyImg"+i)
				document.getElementById("historyImg"+i).src = obj.src.replace("On", "Off");
			}
		}

	}
}


