var currId = null;

function headDivAdjust(){
	var div=$('zone1'),
		headerBanner=$('headerBanner');
	
	headerBanner.setStyle({zIndex:'1'})
	div.style.height='142px';
	div.style.left='8px';
	div.style.top='-40px';
	div.writeAttribute('oheight','142');
	div.writeAttribute('oleft','8px');
	div.writeAttribute('otop','-40');
	div.writeAttribute('otop','-40');
}

function closeFlashContent(id){
	var div=$(id);
	div.style.height=div.readAttribute('oheight')+'px';
	div.style.left=div.readAttribute('oleft');
	div.style.top=div.readAttribute('otop');
	div.style.width=div.readAttribute('owidth')+'px';
}

function HeadExpand(action){
	if(currId!==null){
		closeFlashContent(currId);
	}
	
	var div=$('zone1'),
		headerBanner=$('headerBanner');
	
	if(action==='open'){
		div.style.left='-476px';
		div.style.height='142px';
		div.style.width='960px';
		div.style.top='-38px';
		headerBanner.setStyle({zIndex:'500'})
	}else{
		closeFlashContent(div);
		headerBanner.setStyle({zIndex:'1'})
	}
	currId=div;
}

function showFlashContent(id,height,width,a,b,c,d,expandTo){
	var div=$(id);
	
	switch(expandTo){
		case'up':break;
		case'right':div.style.height=height+'px';div.style.width=width+'px';break;
		case'down':div.style.height=height+'px';break;
		default:var n_pos=(width)-(parseInt(div.readAttribute('owidth'),10));div.style.width=width+'px';div.style.left='-'+n_pos+'px';
	}
	currId=id;
}

