//> Section DEMO REEL ---------------------------------------------------------------------------------------------------
//var urlMp3="http://www.tp1.ca/users/agosseli/audio/"

var flashToPlay="0";

//> Menu---- ---------------------------------------------------------------------------------------------------
var colorOver="#BFCBD7"; var colorOut="#8FA3BB"

	btn1_on = new Image(); btn1_on.src="img/bt_service_on.gif"			
	btn2_on = new Image(); btn2_on.src="img/bt_philo_on.gif"			
	btn3_on = new Image(); btn3_on.src="img/bt_studio_on.gif"			
	btn4_on = new Image(); btn4_on.src="img/bt_demo_on.gif"			
	btn5_on = new Image(); btn5_on.src="img/bt_directions_over.gif"			
	btn6_on = new Image(); btn6_on.src="img/bt_home_over.gif"
	btn7_on = new Image(); btn7_on.src="img/bt_francais_over.gif"
	btn8_on = new Image(); btn8_on.src="img/bt_neighborhood_over.gif"
	btn9_on = new Image(); btn9_on.src="img/bt_team_on.gif"
	btn10_on = new Image(); btn10_on.src="img/bt_client_on.gif"

function LoadImg(){
	preload_images_home();
}

if(section=="demo"){var totalPop=9}
else if(section=="studio"){var totalPop=6}
else if(section=="neighborhood"){var totalPop=6}
else if(section=="direction"){var totalPop=1}
else{}

function enlargeImage(num){
	document.getElementById('texteDiv').style.visibility='hidden';
	for(i=1;i<=totalPop;i++){
		document.getElementById('pop'+i).style.visibility='hidden';
	}		
	document.getElementById('pop'+num).style.visibility='visible';
	document.getElementById('btnClose').style.visibility='visible';
	flashToPlay=num;	
}	

function closeenlargeImage(){
	for(i=1;i<=totalPop;i++){
		document.getElementById('pop'+i).style.visibility='hidden';
	}	
	document.getElementById('btnClose').style.visibility='hidden';
	document.getElementById('texteDiv').style.visibility='visible';	
}

function openFlash(num){
	document.getElementById('texteDiv').style.visibility='hidden';
	document.getElementById('popFlash').style.visibility='visible';
	document.getElementById('btnClose').style.visibility='visible';
	document.getElementById('frameFlash').src="flash_demo"+num+".html"
	flashToPlay=num;	
}	

function closeFlash(){
	document.getElementById('frameFlash').src="flash_vide.html"
	document.getElementById('popFlash').style.visibility='hidden';
	document.getElementById('btnClose').style.visibility='hidden';
	document.getElementById('texteDiv').style.visibility='visible';	
}

function closeDirectionImage(){
	document.getElementById('img_dir1').style.visibility='visible';
	document.getElementById('pop1').style.visibility='hidden';

}

function enlargeDirection(){
	document.getElementById('img_dir1').style.visibility='hidden';
	document.getElementById('pop1').style.visibility='visible';

}	

//> Header ---------------------------------------------------------------------------------------------------
var header=""
+"<div id=\"back1024\">"
+"<div id=\"page\">"
+"<div id=\"header\">"
+"	<div id=\"btnDroite\">"
+"		<img src=\"img/spacer.gif\" height=\"35\" width=\"1\" border=\"0\" /><br />"
+"<a href=\"home.html\" onmouseover=\"btn6.src=btn6_on.src\" onmouseout=\"btn6.src='img/bt_home_off.gif';\"><img src=\"img/bt_home_off.gif\" border=\"0\" alt=\"Home\" id=\"btn6\" /></a>"
+"<a href=\"directions.html\" onmouseover=\"btn5.src=btn5_on.src\" onmouseout=\"rollBtn('btn5');\"><img id=\"btn5\" src=\"img/bt_directions_off.gif\" border=\"0\" alt=\"Direction\" /></a>"
+"<a href=\"neighborhood.html\" onmouseover=\"btn8.src=btn8_on.src\" onmouseout=\"rollBtn('btn8');\"><img id=\"btn8\" src=\"img/bt_neighborhood_off.gif\" border=\"0\" alt=\"Neighborhood\" /></a>"
+"<a href=\"../fr/" + locationURL + ".html\" onmouseover=\"btn7.src=btn7_on.src\" onmouseout=\"btn7.src='img/bt_francais_off.gif';\"><img src=\"img/bt_francais_off.gif\" border=\"0\" alt=\"Francais\" id=\"btn7\" /></a>"
+"	</div>"				
+"</div>"
+"<div id=\"navigation\">"
+"<a href=\"services.html\" onmouseover=\"btn1.src=btn1_on.src;\" onmouseout=\"rollBtn('btn1'); \"><img id=\"btn1\" src=\"img/bt_service_off.gif\" border=\"0\" id=\"Service\" /></a>"
+"<a href=\"philosophy.html\" onmouseover=\"btn2.src=btn2_on.src\" onmouseout=\"rollBtn('btn2'); \"><img id=\"btn2\" src=\"img/bt_philo_off.gif\" border=\"0\" alt=\"Philosophy\" /></a>"
+"<a href=\"studio.html\" onmouseover=\"btn3.src=btn3_on.src\" onmouseout=\"rollBtn('btn3');\"><img id=\"btn3\" src=\"img/bt_studio_off.gif\" border=\"0\" alt=\"Studio\" /></a>"
+"<a href=\"demo.html\" onmouseover=\"btn4.src=btn4_on.src\" onmouseout=\"rollBtn('btn4'); \"><img id=\"btn4\" src=\"img/bt_demo_off.gif\" border=\"0\" alt=\"Demo\" /></a>"
+"<a href=\"team.html\" onmouseover=\"btn9.src=btn9_on.src\" onmouseout=\"rollBtn('btn9'); \"><img id=\"btn9\" src=\"img/bt_team_off.gif\" border=\"0\" alt=\"Our Team\" /></a>"
+"<a href=\"clients.html\" onmouseover=\"btn10.src=btn10_on.src\" onmouseout=\"rollBtn('btn10'); \"><img id=\"btn10\" src=\"img/bt_client_off.gif\" border=\"0\" alt=\"Client\" /></a>"
+"</div>";

//> Menu Service ---------------------------------------------------------------------------------------------------
var menuService=""
+"<div id=\"btnService\">"
+"		 <div style=\"color:white;\" onclick=\"location.href='services.html'\" onmouseover=\"this.style.backgroundColor=colorOver; this.style.cursor='pointer'; this.style.color='#192354';\"  onmouseout=\"this.style.backgroundColor=colorOut; this.style.color='white';\">Original Music</div>"
+"		 <div style=\"color:white;\" onclick=\"location.href='services02.html'\" onmouseover=\"this.style.backgroundColor=colorOver; this.style.cursor='pointer'; this.style.color='#192354';\"  onmouseout=\"this.style.backgroundColor=colorOut; this.style.color='white'\">Audio Post Production</div>"			
+"		 <div style=\"color:white;\" onclick=\"location.href='services03.html'\" onmouseover=\"this.style.backgroundColor=colorOver; this.style.cursor='pointer'; this.style.color='#192354';\"  onmouseout=\"this.style.backgroundColor=colorOut; this.style.color='white'\">Audio Production</div>"
+"		 <div style=\"color:white;\" onclick=\"location.href='services04.html'\" onmouseover=\"this.style.backgroundColor=colorOver; this.style.cursor='pointer'; this.style.color='#192354';\"  onmouseout=\"this.style.backgroundColor=colorOut; this.style.color='white'\">VO and ADR/DUB</div>"
+"		 <div style=\"color:white;\" onclick=\"location.href='services05.html'\" onmouseover=\"this.style.backgroundColor=colorOver; this.style.cursor='pointer'; this.style.color='#192354';\"  onmouseout=\"this.style.backgroundColor=colorOut; this.style.color='white'\">5.1 Surround</div>"
+"		 <div style=\"color:white;\" onclick=\"location.href='services06.html'\" onmouseover=\"this.style.backgroundColor=colorOver; this.style.cursor='pointer'; this.style.color='#192354';\"  onmouseout=\"this.style.backgroundColor=colorOut; this.style.color='white'\">Phone-patch</div>"
+"		 <div style=\"color:white;\" onclick=\"location.href='services07.html'\" onmouseover=\"this.style.backgroundColor=colorOver; this.style.cursor='pointer'; this.style.color='#192354';\"  onmouseout=\"this.style.backgroundColor=colorOut; this.style.color='white'\">FTP</div>"
+"		 <div style=\"color:white;\" onclick=\"location.href='services08.html'\" onmouseover=\"this.style.backgroundColor=colorOver; this.style.cursor='pointer'; this.style.color='#192354';\"  onmouseout=\"this.style.backgroundColor=colorOut; this.style.color='white'\">Mixing and Premastering</div>"
+"		 <div style=\"color:white;\" onclick=\"location.href='services09.html'\" onmouseover=\"this.style.backgroundColor=colorOver; this.style.cursor='pointer'; this.style.color='#192354';\"  onmouseout=\"this.style.backgroundColor=colorOut; this.style.color='white'\">Amenities</div>"
+"</div>"		

//> Footer ---------------------------------------------------------------------------------------------------
var footer=""
+"<div id=\"footer\">"
+"	<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"768\">"					
+"		<tr>"						
+"			<td>410 St-Nicolas Street, Suite 528, Montr&eacute;al QC H2Y 2P5&nbsp;&nbsp;&nbsp;t. +1 514.849.9559&nbsp;&nbsp;&nbsp;f. +1 514.849.2933</td>"
+"			<td align=\"right\"><a href=\"mailto:info@clear-perceptions.com\">info@clear-perceptions.com</a></td>"
+"		</tr>"
+"		<tr>"
+"			<td><img src=\"img/spacer.gif\" height=\"1\" width=\"570\" border=\"0\" /></td>"
+"			<td align=\"right\"><img src=\"img/spacer.gif\" height=\"1\" width=\"170\" border=\"0\" /></td>"
+"		</tr>"
+"	</table>"
+"</div>"
+"</div>"
+"</div>"
+"<div id=\"signature\">&copy;2009 Clear Perceptions Studios, Inc. All rights reserved.</div>"
+"<div id=\"signaturetp1\">"
+"			<a href=\"http://www.tp1.ca\" target=\"_blank\" style=\"text-decoration: none;\">"
+"	 			 <img src=\"img/im_bullet_tp1.gif\" width=\"4\" height=\"7\" alt=\"\" border=\"0\" />&nbsp;Website by TP1&nbsp;<img src=\"img/im_bullet_tp1.gif\" width=\"4\" height=\"7\" alt=\"\" border=\"0\" />"
+"			</a>"
+"</div>";


function rollBtn(num){
	if(num=="btn1"){if (section != "service"){document.getElementById('btn1').src='img/bt_service_off.gif';}}
	if(num=="btn2"){if (section != "philo"){document.getElementById('btn2').src='img/bt_philo_off.gif';}}
	if(num=="btn3"){if (section != "studio"){document.getElementById('btn3').src='img/bt_studio_off.gif';}}
	if(num=="btn4"){if (section != "demo"){document.getElementById('btn4').src='img/bt_demo_off.gif';}}
	if(num=="btn5"){if (section != "direction"){document.getElementById('btn5').src='img/bt_directions_off.gif';}}
	if(num=="btn8"){if (section != "neighborhood"){document.getElementById('btn8').src='img/bt_neighborhood_off.gif';}}
	if(num=="btn9"){if (section != "team"){document.getElementById('btn9').src='img/bt_team_off.gif';}}
	if(num=="btn10"){if (section != "client"){document.getElementById('btn10').src='img/bt_client_off.gif';}}
}

//var section="home";

function menuStarter(mysection){
	if(mysection != "" || service != null){
		if(mysection=="home"){}
		else if (mysection == "service"){document.getElementById('btn1').src=btn1_on.src;}
		else if (mysection == "philo"){document.getElementById('btn2').src=btn2_on.src;}
		else if (mysection == "studio"){document.getElementById('btn3').src=btn3_on.src;}
		else if (mysection == "demo"){document.getElementById('btn4').src=btn4_on.src;}
		else if (mysection == "direction"){document.getElementById('btn5').src=btn5_on.src;}
		else if (mysection == "neighborhood"){document.getElementById('btn8').src=btn8_on.src;}
		else if (mysection == "team"){document.getElementById('btn9').src=btn9_on.src;}
		else if (mysection == "client"){document.getElementById('btn10').src=btn10_on.src;}
		
	}
}

var preloaded = new Array();
function preload_images() {
    for (var i = 0; i < arguments.length; i++){
				var x= document.createElement('preloaded' + i);
				x = new Image();
        x.setAttribute('src',arguments[i]);
    };
};
function preload_images_home() {
    preload_images(
        'img/bt_service_off.gif',			
        'img/bt_philo_off.gif',	
        'img/bt_studio_off.gif',			
        'img/bt_demo_off.gif',	
        'img/bt_team_off.gif',
        'img/bt_client_off.gif',
        'img/bt_directions_off.gif',			
        'img/bt_home_off.gif',
        'img/bt_francais_off.gif',
        'img/bt_neighborhood_off.gif',
        'img/img_left.jpg',
        'img/img_left_team.jpg',				
				'img/img_left_studio.jpg',
				'img/img_left_service.jpg',
				'img/img_left_philo.jpg',
				'img/img_left_neighborhood.jpg',
				'img/img_left_directions.jpg',
				'img/img_left_demo.jpg',																
        'img/img_left_clients.jpg',				
        '../css/img/background.jpg',
        '../css/img/img_right.jpg'
    );
};