<?php include("../../../../php/aw-php/js.php"); ?>
var FV = F + " " + V;
var FP = F + " " + P;
var FVP= F + " " + V + " " + P;

function show(it){};
function hide(it){};


function write(it) {
	return document.write(it)
}

/////////////////////////////////// DECIDING 2 COLUMNS OR 3 /////////////////////////////////////////////////////////


function chooseColumns() {	
	write ( '<style type="text/css"><!--\n' );
	if ( W<1024 ) {
		write ( '#body \{ width:100%; \}\n' );
		write ( 'body \{ background:#686898; background-position:right; \}\n' );
	}
	if ( W<750 ) {
		write ( '#RCol .note, #RCol .cert, #RCol .new-life, #RCol .Search  \{ display:none; border:0; \}\n' );
		write ( 'td#RCell, div#RCol \{ width:0; \}\n' );
		write ( '#midCol \{ right:0; \}\n' );
		write ( '--><\/style>\n' );
		prepareSubNav();
	}
	if ( W >= 750 ) {
		write ( '--><\/style>\n' );
	}	
}

var W = 0; // Browser's window width calculated in the <head> - except for explorer, which uses bodyJS()

if ( window.innerWidth ) {
	W = window.innerWidth;
	chooseColumns();
}

function bodyJS() {
	if ( document.body ) {
		if (  ! window.innerWidth ) {
			if ( document.body.clientWidth )	{
				W = document.body.clientWidth;
				chooseColumns();
			}
		}
	}
}

//////////////////////////////////////// CONSTRUCTING COLUMN 3 ////////////////////////////////////////////////////

var SubNav;

function prepareSubNav() {

	var certLDiv = '<div class="cert"><div class="cert-head"><strong>6 Weeks Guarantee<\/strong><\/div><div>I want no unsatisfied pupils. If you\'re not happy with your Alexander lessons, just tell me within 6 weeks and I will give you a <a class="nplink" tabindex="3000" href="/guarantee.html">full refund<\/a>. You be the judge!<\/div><\/div>';

	var lifeLDiv = '<div class="new-life">Free video: <a class="plink" tabindex="3000" href="/video.html">&#8220;A&nbsp;New&nbsp;Life&#8221;<\/a><\/div>';

   var noteLDiv = '<div class=\"note\"><div class=\"head\">Project Struck Gold<\/div><div>In 2005, my <a class=\"plink\" tabindex=\"3000\" href=\"/teachers/have-no-society/#solution\">project<\/a> helping pupils find a teacher <a class=\"plink\" tabindex=\"3000\" href=\"/teachers/have-no-society/mellor.html#email\">struck gold<\/a>, in India. Many thanks to <a class=\"nplink\" tabindex=\"3000\" href=\"/teachers/have-no-society/mellor.html#email\">Dr Deepak Sharan<\/a>.<\/div>	<div class=\"half\"><ul class=\"side-list\"><li>Do you live in a country with no Alexander teacher? Do you want one?<\/li><li>Are you an Alexander teacher who would like to start a practice in such a country?<\/li><\/ul><\/div><div>Either way, I can help: <a class=\"nplink\" tabindex=\"2000\" href=\"/contact.html\">just e-mail me<\/a>.<\/div><\/div>'


  	var searchForm = '';

	var askMe = 'If you can\'t find the answer to your question, <a class="nplink" tabindex="3000" href="/contact.html">e-mail me<\/a>.'

	var SrchLDiv = '<div class="nav"><a class="nav" href="http://www.smilingbackmethod.com/search.htm">Search</a><\/div>';

	noteLDiv = (MENU==1) ? noteLDiv : "";
	SrchLDiv = (MENU==1) ? SrchLDiv : "";

	SubNav = '<div id="subNav"><div>' + SrchLDiv + lifeLDiv + certLDiv +  noteLDiv + '<\/div><\/div>';
}

function belowLeftColumn() {
	if ( W<750 ) {
		write(SubNav);
	}
}

/////////////////////////////////////////////  FLY-OUT MENUS ///////////////////////////////////////////////////////////

function translate(it) {
	if ( useDHTML==1 ) {
		if ( document.getElementById(it) ) {
			return  document.getElementById(it).style;
		}
		else {
			return 0;
		}
	}
}


function show(it) {
	if ( useDHTML==1 ) {
		translate(it).visibility = "visible";
	}
}

function hide(it) {
	if ( useDHTML==1 ) {
		translate(it).visibility = "hidden";
	}
}

function addArrow() {
	if ( useDHTML==1 ) {
		if ( FP != "explorer mac" || Version >= 5.1 ) {   // arrow alignment wrong for explorer 5.0 mac
			write('<img class="arrow" src="/images/arrow2.gif" width="5" height="9" alt="" \/>');
		}	
	}
}

//////////////////////////////////////////////// SHOW NAVIGATION //////////////////////////////////////////////////////

function display(it) {
	if ( MENU==0 ) {
		translate(it).display = "block";
	}
}

function remove(it) {
	if ( MENU==0 ) {
		translate(it).display = "none";
	}
}


///////////////////////////////////////////////// OTHER ///////////////////////////////////////////////////////////////

function ok() {
	RememberSize();
}


function up() {
	self.scrollTo( 0,0 );
}

function clickNav() {
	write('<a class="nav" id="clicknav" tabindex="1000" href="#" onclick="display(\'nav\'); remove(\'shownav\')">navigation bar<\/a>');
}

function previousPageButton() {
	write('<p><strong><a class="nplink" id="learn" tabindex="100"  href="javascript: history.go(-1)">Back to the previous page<\/a><\/strong></p>');
}

function previousPageText() {
	write('<p><a class="nplink" tabindex="100"  href="javascript: history.go(-1)">back to the previous page<\/a></p>');
}

//////////////////////////////////////// RE-LOAD ON RE-SIZE WIDTH BETWEEN < 750 & >= 750 ///////////////////////////////

function Reload_If_Needed() {

	if  ( F == "explorer" ) {
		var largeWindow = ( document.body.clientWidth >= 1024 ) ? "l" : ( ( document.body.clientWidth >= 750 ) ? "m" : "s" );
		if ( document.size.large != largeWindow ) {
	   		document.location = document.location;
		}
	}
	else {
		var largeWindow = ( window.innerWidth >= 1024 ) ? "l" : ( ( window.innerWidth >= 750 ) ? "m" : "s" );
		if ( document.size.large != largeWindow ) {
			var temp = document.location;
			document.location = temp;
		}
	}

}

function RememberSize() {
	if  ( F== "explorer" ) {
		document.size = new Object;
		document.size.initwidth = document.body.clientWidth;
		document.size.large = ( document.size.initwidth >= 1024 ) ? "l" : ( ( document.size.initwidth >= 750 ) ? "m" : "s" );
		document.body.onresize = Reload_If_Needed;

	}
	else if ( ( F != "konqueror" || Version >= 3.0 ) ) {
		document.size = new Object;
		document.size.initwidth  = window.innerWidth;
		document.size.large = ( document.size.initwidth >= 1024 ) ? "l" : ( ( document.size.initwidth >= 750 ) ? "m" : "s" );
		window.onresize = Reload_If_Needed;
	}
}

function video(id) {
	write('<object width="425" height="344" style="float:right;"><param name="movie" value="http://www.youtube.com/v/' + id + '&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/' + id + '&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>');
}
