// titles for Design Examples in right hand menus and page titles - leave blank for those pages not available.

e1 = "Austroflamm Stola";
e2 = "Asquith Gallery ";
e3 = "Theale&nbsp;Fireplaces&nbsp;Gothic";
e4 = "Walnut";
e5 = "Rose Aurora";
e6 = "";
e7 = "";
e8 = "";
e9 = "";
e10 = "";
e11 = "";
e12 = "";
e0 = "";





// Design Examples flame picture titles - leave blank for those pages not available.

ef1 = "";
ef2 = "";
ef3 = "";
ef4 = "";
ef5 = "";
ef6 = "";
ef7 = "";
ef8 = "";
ef9 = "";
ef10 = "";
ef11 = "";
ef12 = "";
ef0 = ""; 

// titles for Showroom  in right hand menus and page titles - leave blank for those pages not available.

s1 = "Dancing Flame";
s2 = "Chesney Burlington";
s3 = "Euroheat";
s4 = "Warmland 2";
s5 = "Hunter Gas";
s6 = "Austroflamm Stola";
s7 = "Verine Ultraflue";
s8 = "Verine Fanfare";
s9 = "Chesney Fountainbleu";
s10 = "Gasco Riva";
s11 = "Broseley Warmland 4";
s12 = "Stovax Clarendon";
s0 = "";
// Showroom flame picture titles - leave blank for those not available


sf1 = "";
sf2 = "";
sf3 = "";
sf4 = "";
sf5 = "";
sf6 = "";
sf7 = "";
sf8 = "";
sf9 = "";
sf10 = "";
sf11 = "Broseley Warmland 4";
sf12 = "Stovax Clarendon";
sf0 = ""; 

// Definitions of arrays containing above information.

var examples = new Array(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12);
var showroom = new Array(s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12);
var showroom_flames = new Array(sf0,sf1,sf2,sf3,sf4,sf5,sf6,sf7,sf8,sf9,sf10,sf11,sf12);
var example_flames = new Array(ef0,ef1,ef2,ef3,ef4,ef5,ef6,ef7,ef8,ef9,ef10,ef11,ef12);

// Routine to create drop down list in Flame Video Player for showroom

function fill_showroom_options() {
	for (i = 0 ; i<=12 ;i++ ) {
	  if (showroom_flames[i] != "") {document.writeln("<OPTION VALUE=\"video/showroom" + i + ".wmv\">" + showroom_flames[i] )}
	}
}

// Routine to create drop down list in Flame Video Player for design examples

function fill_examples_options() {
	for (j = 0 ; j<=12 ;j++ ) {
	  if (example_flames[j] != "") {document.writeln("<OPTION VALUE=\"video/example" + j + ".wmv\">" + example_flames[j] )}
	}
}

// Routine to write title for design examples template pages 

function write_example_title(callingpage){
document.writeln("\<h2\>Custom Designs from Theale Fireplaces\<br\>" + examples[(callingpage)]  +"\</h2\>");
}

// Routine to write title for showroom template pages 

function write_showroom_title(callingpage){
document.writeln("\<h2\>" + showroom[(callingpage)] + " on display\<br\>in Theale Fireplaces Showroom\</h2\>");
}

// Function to create the right hand menu for Design Examples template pages with Flame Video link at bottom

function examples_right_menu(callingpage){

	document.writeln("\<B\>Custom&nbsp;Designs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<\/B\>\<br\>");
	for (k = 0 ; k<=12 ;k++ ) {
		if (examples[k] != "" ){
			if (callingpage == k ) {document.writeln("\<FONT SIZE=\"-1\"  COLOR=\"#909090\" \>\<b>" + examples[k] + "\<\/b>\<\/FONT\>\<br\>"); } 
			else { document.writeln("\<FONT SIZE=\"-1\"  \>\<a href=\"example" + k + ".htm\"\>" + examples[k] + "\<\/a\>\<\/FONT\>\<br\>"); }
		}
	}
	if(example_flames[callingpage] != "") {
	document.writeln("&nbsp;\<br\>\<a href=\"javascript:popitup(\'mediaplayer.htm?video\/example" + callingpage + ".wmv\')\" \>\<FONT COLOR=\"#F04000\" FACE=\"COMIC SANS MS\"\>\<I\>Flame Picture\<\/I\>\<\/FONT\>\<\/a\>");
	}
}
// Function to create the right hand menu for Showroom template pages with Flame Video link at bottom
function showroom_right_menu(callingpage){
	
	document.writeln("\<B\>Showroom&nbsp;Displays&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<\/B\>\<br\>");

	for (k = 1 ; k<=12 ;k++ ) {
		if (showroom[k] != "" ){
			if (callingpage == k ) {document.writeln("\<FONT SIZE=\"-1\"  COLOR=\"#909090\" \>\<b>" + showroom[k] + "\<\/b>\<\/FONT\>\<br\>"); } 
			else { document.writeln("\<FONT SIZE=\"-1\"  \>\<a href=\"showroom" + k + ".htm\"\>" + showroom[k] + "\<\/a\>\<\/FONT\>\<br\>"); }
		}
	}
	if(showroom_flames[callingpage] != "") {
	document.writeln("&nbsp;\<br\>\<a href=\"javascript:popitup(\'mediaplayer.htm?video\/showroom" + callingpage + ".wmv\')\" \>\<FONT COLOR=\"#F04000\" FACE=\"COMIC SANS MS\"\>\<I\>Flame Picture\<\/I\>\<\/FONT\>\<\/a\>");
	}
document.writeln("\&nbsp;\<\/FONT\>");
}

// Routine for popup windows with title, size and background colour parameters. 

var newwindow = ''
var wheight = 0
var wwidth = 0
function popitup5(url , title, iwidth, iheight , colour) {
if (wheight!=iheight || wwidth!=iwidth){tidy()};
if (newwindow.location && !newwindow.closed && wwidth==iwidth && wheight==iheight) 
{ newwindow.focus(); newwindow.document.clear() } 
else 
{ 
pwidth=iwidth+30;
pheight=iheight+30;
newwindow=window.open('','','width=' + pwidth +',height=' +pheight + ',resizable=1');
wheight=iheight;
wwidth=iwidth;
}
newwindow.document.writeln('<html> <head> <title>' + title + '<\/title> <\/head> <body bgcolor= \"' + colour + '\"> <center>');
// Update to add display title when hovering over popup window 21/7/2009 
newwindow.document.writeln('<img src=' + url + ' title=\" ' + title + '\">');
newwindow.document.writeln('<\/center> <\/body> <\/html>');
newwindow.document.close();
}

//Routine for basic popup window

var newwindow1 = ''
function popitup(url) {
	if (newwindow1.location && !newwindow1.closed) 
	{ newwindow1.location.href = url; newwindow1.focus(); } 
	else 
	{ newwindow1=window.open(url,'htmlname','width=340,height=390,resizable=1') ; }
}

//Routine to tidy up popup windows when page is left

function tidy()
{
if (newwindow.location && !newwindow.closed) { newwindow.close(); }
if (newwindow1.location && !newwindow1.closed) { newwindow1.close(); } 
}

//Routines specifically for popup feedback windows

var fbwindow = ''
function fbpopitup(url) {
	if (fbwindow.location && !fbwindow.closed) 
	{ fbwindow.location.href = url; fbwindow.focus(); } 
else 
	{ fbwindow=window.open(url,'htmlname','width=520,height=420,resizable=1,scrollbars=1') ; }
}
function fbtidy(){
if (fbwindow.location && !fbwindow.closed) {fbwindow.close(); } }

//Routine to write email address to avoid adress harvisters.

function tf_email() { 

document.writeln("<A href=\"mailto:" + "mail" + "&#64;" + "theale-fireplaces.co.uk\">"  +    "mail" + "&#64;" + "theale-fireplaces.co.uk" + " \<\/A> ") ;}

// Last update 21/7/2009
// Based on JavaScript provided by Peter Curtis at www.pcurtis.com -->