
function loadCal(Y,M,C){
ajax_content_onload_getB('../SCRIPT/onlyCal.php?y='+Y+'&m='+M+'&c='+C,'','cals','load_cal');
return false; 
}


function cal(Y,M,C,lastCase){
ajax_content_onload_getB('../SCRIPT/onlyCal.php?y='+Y+'&m='+M+'&c='+C+'&lc='+lastCase,'','cals','load_cal');

}


function TigilError() {
	return true;
}
window.onerror = TigilError;




function openroom(url)  {

wx = 600;

wy = 520;

x = (screen.width  - wx) / 2;

y = (screen.height - wy) / 2;

newWinr = window.open(url,"openinsr","scrollbars=1,left="+x+",top="+y+",width="+wx+",height="+wy);
newWinr.focus();

}



function popup(id,status){

if(status == 1){
document.getElementById(id).style.display = 'block';
}else{
document.getElementById(id).style.display = 'none';
}

}

function bg(id,status){
if(status == 1){
document.getElementById(id).style.background = '#F7EFBB';
}else{
document.getElementById(id).style.background = '#FDFDFD';
}
}



//// Contents ///////////////////


function nextCharge(){


var status = document.getElementById('charge').value;

//status = 1;

var s1 = document.getElementById('s1');
var s2 = document.getElementById('s2');
var s3 = document.getElementById('s3');

if(status == 1){

Charge1 = 5000;
Charge2 = 5600;
Charge3 = 5800;
Charge4 = 6400;
Charge5 = 7200;
Charge6 = 7800;
Charge7 = 5800;
Charge8 = 6400;


s1.sectionRowIndex = 0;
s1.style.background = "#FC0"; 
s1.style.color = "#000"; 

}else if(status == 2){


Charge1 = 4200;
Charge2 = 4800;
Charge3 = 5000;
Charge4 = 5600;
Charge5 = 6400;
Charge6 = 7000;
Charge7 = 5000;
Charge8 = 5600;

s2.sectionRowIndex = 1;
s2.style.background = "#FC0"; 
s2.style.color = "#000"; 

}else{
	
Charge1 = 5000;
Charge2 = 5600;
Charge3 = 5800;
Charge4 = 6400;
Charge5 = 5800;
Charge6 = 6400;
Charge7 = 7200;
Charge8 = 7800;

s3.sectionRowIndex = 2;
s3.style.background = "#FC0"; 
s3.style.color = "#000"; 
}

document.getElementById('c1').innerHTML = Charge1;
document.getElementById('c2').innerHTML = Charge2;
document.getElementById('c3').innerHTML = Charge3;
document.getElementById('c4').innerHTML = Charge4;
document.getElementById('c5').innerHTML = Charge5;
document.getElementById('c6').innerHTML = Charge6;
document.getElementById('c7').innerHTML = Charge7;
document.getElementById('c8').innerHTML = Charge8;


document.getElementById('foc').focus();

}


function nextSP(){
var sel = document.getElementById('charge'); 
vsel = sel.value;

var boxA = document.getElementById('boxA');
var boxB = document.getElementById('boxB');

if(vsel == '1'){
boxA.style.display ='none';
boxB.style.display ='block';
}else{
boxA.style.display ='block';
boxB.style.display ='none';
}

sel.selectedIndex = vsel;

}


window.onload=function(){
nextCharge('2');	

var contHi = document.getElementById('leftContena').clientHeight;
document.getElementById('cov').style.height = contHi+'px';

}






