function blockEvent(event){if (!event){event = window.event;}if(event.stopPropagation) event.stopPropagation();else event.cancelBubble = true;if(event.preventDefault) event.preventDefault();else event.returnValue = false;}
$(document).ready(function(){
	$('#content hr').each(function(){
		$(this).after('<div class=hr></div>');
		$(this).remove();
	});
	$('#mn_1,#mn_2,#mn_3,#mn_4,#mn_5,#mn_6,#mn_7').hover(function(){
		temp=this.id.match(/^mn_(.*)$/);
		$('div.d2',this).css('display','block');
		if($('#mn_'+(parseInt(temp[1])-1)+' .a').length) $('.ov',this).css('display','block');
		//$('#mn_of_'+(parseInt(temp[1])-1)).css('display','block');
	},function(){
		temp=this.id.match(/^mn_(.*)$/);
		$('div.d2',this).css('display','none');
		if($('#mn_'+(parseInt(temp[1])-1)+' .a').length) $('.ov',this).css('display','none');
		//$('#mn_of_'+(parseInt(temp[1])-1)).css('display','none');
	});
	$('#cr_lt').hover(function(){$(this).css('background-position','0px -46px')},function(){$(this).css('background-position','0px 0px')});
	$('#cr_rt').hover(function(){$(this).css('background-position','-21px -46px')},function(){$(this).css('background-position','-21px 0px')});
});

function flash_off(){
	$('#home_flash').html('').hide();
	$('#bn_flash').hide();
	$('#home_noflash').show();
}

var ct_id;
function cr_left(){
	ct_scroll((parseInt(ct_id)-1));
}
function cr_right(){
	ct_scroll((parseInt(ct_id)+1));
}
function cr_strs(){
	$('#cr_lt').css('display',($('#cr_'+(parseInt(ct_id)+1)).length?'':'none'));
	$('#cr_rt').css('display',($('#cr_'+(parseInt(ct_id)-1)).length?'':'none'));
}
function cr_start(id){
	ct_id=id;
	$('#cr_div table').css('left',-(750*(parseInt(id)-1)));
	pos=$('#crm_'+id).position();
	$('#cr_tb').css('left',406-pos.left);
	$('#cr_pop_in').css('width',$('#crm_'+id+' img').width()+2);
}
function ct_scroll(id){
	if(!$('#crm_'+id).length) return;
	ct_id=id;
	pos=$('#crm_'+id).position();
	$('#cr_tb').animate({'left':406-pos.left},600);
	$('#cr_pop_in').animate({'width':$('#crm_'+id+' img').width()+2},600);
	$('#cr_div table').animate({'left':-(750*(parseInt(id)-1))},600);
}

var ph_id;
function ph_left(){
	ph_scroll((parseInt(ph_id)-1));
}
function ph_right(){
	ph_scroll((parseInt(ph_id)+1));
}
function ph_scroll(id){
	if(!$('#phm_'+id).length) return;
	ph_id=id;
	pos=$('#phm_'+id).position();
	$('#ph_tb').animate({'left':306-pos.left},600);
	$('#cr_pop_in').animate({'width':$('#phm_'+id+' img').width()+2},600);
	$('#ph_div table').animate({'left':-(236*(parseInt(id)-1))},600);
}
function ph_start(id){
	ph_id=id;
	pos=$('#phm_'+id).position();
	$('#ph_tb').css('left',306-pos.left);
	$('#cr_pop_in').css('width',$('#phm_'+id+' img').width()+2);
}

function cl_left(ol,nw){
	$('#mon_'+ol).animate({left:-300,opacity:0},500);
	$('#mon_'+nw).css({left:300,opacity:0}).animate({left:0,opacity:1},500);
}
function cl_right(ol,nw){
	$('#mon_'+ol).animate({left:300,opacity:0},500);
	$('#mon_'+nw).css({left:-300,opacity:0}).animate({left:0,opacity:1},500);
}
function nw_scroll(id){
	pos=$('.nw_'+id).position();
	$('body').scrollTo({top:pos.top},500);
}
function ch_city(id){
	$('.cities').css('display','none');
	$('#city_'+id).css('display','');
	$('#pop_city').css('display','none');
}
function w_open(URLStr,w,h,scr,target){if(target=='') target='_blank';if(scr)ShowScroll='yes';else ShowScroll='no';var width=w;var height=h;var left=0;var top=0;if (width>screen.availWidth){width=screen.availWidth-10;	ShowScroll='yes';}if (height>screen.availHeight){height=screen.availHeight-40;	ShowScroll='yes';}left=(screen.availWidth-width)/2-5;top=(screen.availHeight-height)/2-20;window.open(URLStr,target,'location=no,directories=no,toolbar=no,status=no,menubar=no,scrollbars='+ShowScroll+',copyhistory=yes,resizable='+ShowScroll+',width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');}