function btn1(){
	document.getElementById("btn1_cont").style.display="block";
	flashFX();	
}

function btn2(){
	document.getElementById("btn2_cont").style.display="block";
	flashFX();	
}

function btn3(){
	document.getElementById("btn3_cont").style.display="block";
	flashFX();	
}

function btn4(){
	document.getElementById("btn4_cont").style.display="block";
	flashFX();	
}

function btn5(){
	document.getElementById("btn5_cont").style.display="block";
	flashFX();	
}

function btn6(){
	document.getElementById("btn6_cont").style.display="block";
	flashFX();	
}

function btn7(){
	document.getElementById("btn7_cont").style.display="block";
	flashFX();	
}

function btn8(){
	document.getElementById("btn8_cont").style.display="block";
	flashFX();	
}

function readmore1(){
	document.getElementById("btn2_cont").style.display="block";
	flashFX();	
}

function readmore2(){
	document.getElementById("btn3_cont").style.display="block";
	flashFX();	
}

function readmore3(){
	document.getElementById("btn4_cont").style.display="block";
	flashFX();	
}

function readmore4(){
	document.getElementById("btn5_cont").style.display="block";
	flashFX();	
}

function readmore5(){
	document.getElementById("btn6_cont").style.display="block";
	flashFX();	
}

function readmore6(){
	document.getElementById("btn7_cont").style.display="block";
	flashFX();	
}

function readmore7(){
	document.getElementById("btn8_cont").style.display="block";
	flashFX();	
}

function wClose(){
	//Get the A tag
			var id = $(this).attr('href');
		
		//if close button is clicked
		$('.window .close').click(function (e) {
			//Cancel the link behavior
			e.preventDefault();
			
			$('#mask').hide();
			$('.window').hide();
		});	
}

function flashFX(){
	//Get the A tag
			var id = $(this).attr('href');
		
			//Get the screen height and width
			var maskHeight = $(document).height();
			var maskWidth = $(window).width();
		
			//Set heigth and width to mask to fill up the whole screen
			$('#mask').css({'width':maskWidth,'height':maskHeight});
			
			//transition effect		
			$('#mask').fadeIn(1000);	
			$('#mask').fadeTo("slow",0.8);	
		
			//Get the window height and width
			var winH = $(window).height();
			var winW = $(window).width();
				  
			//Set the popup window to center
			$(id).css('top',  winH/2-$(id).height()/2);
			$(id).css('left', winW/2-$(id).width()/2);
		
			//transition effect
			$(id).fadeIn(2000); 
		
		//if close button is clicked
		$('.window .close').click(function (e) {
			//Cancel the link behavior
			e.preventDefault();
			
			$('#mask').hide();
			$('.window').hide();
		});	
		
		$('.window2 .close').click(function (e) {
			//Cancel the link behavior
			e.preventDefault();
			
			$('#mask').hide();
			$('.window2').hide();
		});		
		
		//if mask is clicked
		$('#mask').click(function () {
			$(this).hide();
			$('.window').hide();
			$('.window2').hide();
		});		
}

function openNew(urlname){
	window.open(urlname,'popwin2','resizable=no,height=550,width=800,toolbar=no,scrollbars=no,location=no,left=350');	
}

function openNew2(urlname){
	window.open(urlname,'popwin3','resizable=no,height=550,width=900,toolbar=no,scrollbars=no,location=no,left=50');	
}
