var map_desc = new Array();
map_desc[1] = new Array('121,439,139,456','Brisbane CBD - 2.5km','Queensland\'s cosmopolitan capital city featuring Queen Street Mall, QUT Gardens Point campus, restaurants, bars, casino, city botanic gardens and Roma Street parklands.');
map_desc[2] = new Array('99,155,116,172','Royal Brisbane and Women\'s Hospital - 700m','Queensland\'s largest tertiary hospital, specialising in medicine, oncology, orthopaedics, psychiatry, surgery, trauma, women and newborns.');
map_desc[3] = new Array('266,251,284,267','Emporium - 550m','The stylish Emporium Hotel shares a complex with 35 specialty retailers, including restaurants, boutiques and a supermarket.');
map_desc[4] = new Array('279,305,294,321','James Street - 800m','The Valley\'s James Street precinct is filled with restaurants, bars, cafes, fresh food market, cinemas and a broad range of retailers.');
map_desc[5] = new Array('158,207,174,223','RNA Showgrounds - 300m','Home to The Royal Queensland Show, "The Ekka" each August, the RNA Showgrounds also hosts an array of events, concerts, festivals and exhibitions.');
map_desc[6] = new Array('266,148,283,166','Twelfth Night Theatre - 200m','The 520 seat theatre is the only privately owned theatre in Australia and regularly presents comedies and dramatic productions.');
map_desc[7] = new Array('133,175,150,189','Bowen Park - 700m','A heritage park with rainforest and "old world" landscaping features including a rotunda, canna beds and various annual displays.');
map_desc[8] = new Array('370,73,386,89','Newstead Park - 920m','A picturesque park on the banks on the Brisbane River and home to historic Newstead House, Brisbane\'s oldest surviving residence.');
map_desc[9] = new Array('6,287,23,303','QUT Kelvin Grove - 1.2km','The Kelvin Grove campus houses QUT\'s Creative Industries Precinct, hosting performances, installations and cultural events.');
map_desc[10] = new Array('222,242,239,257','Fortitude Valley State School - 500m','One of Brisbane\'s oldest and most historic schools, Fortitude Valley has a small enrolment and strong community ties.');
map_desc[11] = new Array('174,232,190,248','Tivoli Theatre - 600m','The elegantly restored art deco Tivoli Theatre is one of Brisbane\'s favourite venues for live music.');
map_desc[12] = new Array('201,327,217,342','Fortitude Valley Market - 1.2km','Popular markets held in the Brunswick St and China Town Malls every Saturday and Sunday.');
map_desc[13] = new Array('359,36,376,51','Breakfast Creek Hotel - 1.2km','Queensland\'s most iconic pub, built in 1889 and famous for its steaks and beer served "off the wood".');
map_desc[14] = new Array('133,222,150,239','The Old Museum - 1.5km','The unique and spectacular Old Museum is one of Brisbane\'s landmark buildings and home to the Queensland Youth Orchestra.');
map_desc[15] = new Array('17,236,34,253','Victoria Park Golf Course - 1.5km','An 18 hole golf course with beautiful greens, a cafe / bar, and even an 18 hole putt putt course.');
map_desc[16] = new Array('60,290,77,307','Centenary Aquatic Centre	- 1.1km','Olympic sized swimming pool, open year-round, with high diving platforms, a fitness centre and regular classes.');
map_desc[17] = new Array('249,269,266,286','Fortitude Valley Pool - 650m','Newly refurbished Olympic sized swimming pool with underwater viewing windows, and historic Valley Baths facade, open year-round.');
map_desc[18] = new Array('247,120,264,137','Bowen Hills Train Station - 500m','Bowen Hills services the Ferny Grove, Caboolture, Shorncliffe, Airport and Doomben lines and is just two stops away from central station with links to all other lines.');
map_desc[19] = new Array('269,121,286,137','Bowen Hills Bus Station - 600m','A new bus station will form part of the northside\'s new, free flowing Northern Busway system of tunnels and dedicated bus lanes.');
map_desc[20] = new Array('178,308,195,327','Fortitude Valley Train Station - 1.2km','Fortitude Valley railway station (formerly Brunswick Street railway station) is located beneath the Valley Metro complex, with four platforms it is located in Zone 1 of the TransLink integrated public transport system.');

function mapmouse(intcode) {
	document.getElementById('roll_title').innerHTML = map_desc[intcode][1];
	document.getElementById('roll_text').innerHTML = map_desc[intcode][2];
	document.getElementById('roll_img').src = 'images/loc_roll/'+intcode+'.jpg';
}

function addAreas() {
	var target = document.getElementById('roll_map');
	for(var v=1;v<map_desc.length;v++) {
		var area = document.createElement('area');
		area.href = '#';
		area.alt = map_desc[v][1];
		area.title = map_desc[v][1];
		area.shape = 'rect';
		area.coords = map_desc[v][0];
		area.rollcode = v;
		area.onmouseover = function() { mapmouse(this.rollcode); }
		target.appendChild(area);
	}
}

function setOp(intval,makeop) {
	for(var t=1;t<=7;t++) {
		var crrntimg = document.getElementById('activeImg').value;
		var target = document.getElementById('design'+t);
		if(t!=crrntimg) {
			if(makeop) {
				if(t==intval) target.className = 'img_full';
				else target.className = 'img_opaque';
			} else target.className = 'img_opaque';
		}
	}
}

function loadImg(intval) {
	var crrntimg = document.getElementById('activeImg').value;
	document.getElementById('activeImg').value = intval;
	var past = document.getElementById('design'+crrntimg);
	past.intnum = crrntimg;
	past.onclick = function() { loadImg(this.intnum); }
	past.className = 'img_opaque';
	var target = document.getElementById('design'+intval);
	target.onclick = '';
	past.className = 'img_full';
	$('designmain'+intval).morph({'opacity': 1});
	for(var w=1;w<=7;w++) {
		if(w!=intval) {
			$('designmain'+w).morph({'opacity': 0});
		}
	}
	setOp(intval,true)
}
function viewsRoll(val,opaq) {
	$('green'+val).morph({'opacity': opaq});
	$('green_img'+val).morph({'opacity': opaq});
	for(var w=1;w<=11;w++) {
		if(w!=val) {
			$('green'+w).morph({'opacity': 0});
			$('green_img'+w).morph({'opacity': 0});
		}
	}
}

var floor_content = new Array();
floor_content[1] = new Array();
floor_content[1]["Type"] = 'E';
floor_content[1]["Area"] = '89';
floor_content[1]["Levels"] = 'G - 9';                                    //<br>FLOOR AREA - 75m&sup2;<br>BALCONY AREA - 14m&sup2;<br>TOTAL AREA - 89m&sup2;
floor_content[1]["Content"] = 'BEDROOMS - 2<br>BATHROOMS - 2<br>STUDY - 1';
floor_content[1]["Link"] = 'files/typee.pdf';
floor_content[2] = new Array();
floor_content[2]["Type"] = 'C';
floor_content[2]["Area"] = '62';
floor_content[2]["Levels"] = 'G - 9';                                    //<br>FLOOR AREA - 52m&sup2;<br>BALCONY AREA - 10m&sup2;<br>TOTAL AREA - 62m&sup2;
floor_content[2]["Content"] = 'BEDROOMS - 1<br>BATHROOMS - 1<br>STUDY - 1';
floor_content[2]["Link"] = 'files/typec.pdf';
floor_content[4] = new Array();
floor_content[4]["Type"] = 'D';
floor_content[4]["Area"] = '79';
floor_content[4]["Levels"] = 'G - 9';                       //<br>FLOOR AREA - 69m&sup2;<br>BALCONY AREA - 10m&sup2;<br>TOTAL AREA - 79m&sup2;
floor_content[4]["Content"] = 'BEDROOMS - 2<br>BATHROOMS - 2';
floor_content[4]["Link"] = 'files/typed.pdf';
floor_content[6] = new Array();
floor_content[6]["Type"] = 'F';
floor_content[6]["Area"] = '101';
floor_content[6]["Levels"] = 'G - 9';                                    //<br>FLOOR AREA - 89m&sup2;<br>BALCONY AREA - 12m&sup2;<br>TOTAL AREA - 101m&sup2;
floor_content[6]["Content"] = 'BEDROOMS - 3<br>BATHROOMS - 2<br>STUDY - 1<br><a class="content" href="javascript:floorRoll(\'6opt\')">VIEW OTHER TYPE F OPTION</a>';
floor_content[6]["Link"] = 'files/typef.pdf';
floor_content["6opt"] = new Array();
floor_content["6opt"]["Type"] = 'F OPTION';
floor_content["6opt"]["Area"] = '101';
floor_content["6opt"]["Levels"] = '1 - 9';                                               //<br>FLOOR AREA - 89m&sup2;<br>BALCONY AREA - 12m&sup2;<br>TOTAL AREA - 101m&sup2;
floor_content["6opt"]["Content"] = 'BEDROOMS - 2<br>BATHROOMS - 2<br>STUDY - 1<br>MPR - 1';
floor_content["6opt"]["Link"] = 'files/typefopt.pdf';
floor_content["7a"] = new Array();
floor_content["7a"]["Type"] = 'G1';
floor_content["7a"]["Area"] = '50';
floor_content["7a"]["Levels"] = '1 - 4';                       //<br>FLOOR AREA - 43m&sup2;<br>BALCONY AREA - 7m&sup2;<br>TOTAL AREA - 50m&sup2;
floor_content["7a"]["Content"] = 'BEDROOMS - 1<br>BATHROOMS - 1';
floor_content["7a"]["Link"] = 'files/typeg1.pdf';
floor_content["7b"] = new Array();
floor_content["7b"]["Type"] = 'G2';
floor_content["7b"]["Area"] = '43';
floor_content["7b"]["Levels"] = 'G - 4';                       //<br>FLOOR AREA - 43m&sup2;<br>TOTAL AREA - 50m&sup2;
floor_content["7b"]["Content"] = 'BEDROOMS - 1<br>BATHROOMS - 1';
floor_content["7b"]["Link"] = 'files/typeg2.pdf';
floor_content[8] = new Array();
floor_content[8]["Type"] = 'B1';
floor_content[8]["Area"] = '60';
floor_content[8]["Levels"] = 'G - 9';                       //<br>FLOOR AREA - 50m&sup2;<br>BALCONY AREA - 10m&sup2;<br>TOTAL AREA - 60m&sup2;
floor_content[8]["Content"] = 'BEDROOMS - 1<br>BATHROOMS - 1';
floor_content[8]["Link"] = 'files/typeb1.pdf';
floor_content[9] = new Array();
floor_content[9]["Type"] = 'B2';
floor_content[9]["Area"] = '64';
floor_content[9]["Levels"] = 'G - 9';                                    //<br>FLOOR AREA - 54m&sup2;<br>BALCONY AREA - 10m&sup2;<br>TOTAL AREA - 64m&sup2;
floor_content[9]["Content"] = 'BEDROOMS - 1<br>BATHROOMS - 1<br>STUDY - 1';
floor_content[9]["Link"] = 'files/typeb2.pdf';
floor_content[11] = new Array();
floor_content[11]["Type"] = 'A';
floor_content[11]["Area"] = '50';
floor_content[11]["Levels"] = '1 - 9';                       //<br>FLOOR AREA - 45m&sup2;<br>BALCONY AREA - 5m&sup2;<br>TOTAL AREA - 50m&sup2;
floor_content[11]["Content"] = 'BEDROOMS - 1<br>BATHROOMS - 1';
floor_content[11]["Link"] = 'files/typea.pdf';
floor_content[12] = new Array();
floor_content[12]["Type"] = 'H';
floor_content[12]["Area"] = '64';
floor_content[12]["Levels"] = '1 - 9';                       //<br>FLOOR AREA - 56m&sup2;<br>BALCONY AREA - 8m&sup2;<br>TOTAL AREA - 64m&sup2;
floor_content[12]["Content"] = 'BEDROOMS - 1<br>BATHROOMS - 1';
floor_content[12]["Link"] = 'files/typeh.pdf';

function floorRoll(val) {
	if(val==1) $('plan_table').style.background = 'url(images/floor_plan_e.gif) no-repeat top left';
	else $('plan_table').style.background = 'url(images/floor_plan_main.gif) no-repeat top left';
	if(val!='6opt') $('green'+val).morph({'opacity': 1});
	$('floor_plan'+val).morph({'opacity': 1});
	for(var w=1;w<=12;w++) {
		if(w==7) {
			if(val!='7a') {
				$('green7a').morph({'opacity': 0});
				$('floor_plan7a').morph({'opacity': 0});
			} if(val!='7b') {
				$('green7b').morph({'opacity': 0});
				$('floor_plan7b').morph({'opacity': 0});
			} if(val!=7) {
				$('green7').morph({'opacity': 0});
			}
		} else if(w!=val) {
			$('green'+w).morph({'opacity': 0});
			if($('floor_plan'+w)) $('floor_plan'+w).morph({'opacity': 0});
		}
		if(val!='6opt') $('floor_plan6opt').morph({'opacity': 0});
	}
	if(val==1) {
		$('div7a').style.display = 'none';
		$('div7b').style.display = 'none';
		$('div7').style.display = 'block';
		$('green7').morph({'opacity': 1});
	} else {
		$('div7a').style.display = 'block';
		$('div7b').style.display = 'block';
		$('div7').style.display = 'none';
	}
	if(val==2) {
		$('green3').morph({'opacity': 1});
	}
	if(val==4) {
		$('green5').morph({'opacity': 1});
		$('green10').morph({'opacity': 1});
	}
	if(val=='6opt') {
		$('green6').morph({'opacity': 1});
	}
	$('type').innerHTML = floor_content[val]["Type"];
	$('levels').innerHTML = floor_content[val]["Levels"];
	//$('sqm').innerHTML = floor_content[val]["Area"];
	$('content').innerHTML = floor_content[val]["Content"];
	$('link_type').innerHTML = floor_content[val]["Type"];
	$('divlink').onclick = function() { window.open(floor_content[val]["Link"], 'pdf','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,modal=yes,close=no,resizable=1,width=800,height=600,left=100,top=100'); }
}

function getRadioValue(name) {
	var foundit = true;
	var returnvalue = '';
	var t = 0;
	while(foundit) {
		if(document.getElementById(name+t)) {
        	if(document.getElementById(name+t).checked==true) var returnvalue = document.getElementById(name+t).value;
		} else foundit = false;
		t++;
	}
	return returnvalue;
}
function openPDF(url) {
	var width = 800;
	var height = 600;
	if(url=='disclaimer.html') { width = 310; height = 435; }
	window.open(url, 'pdf','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,modal=yes,close=no,resizable=1,width='+width+',height='+height+',left=100,top=100');
}
function swapInvContent(future_val) {
	var field_name = '';
	if($('invest_content').style.display=='block') field_name = 'invest_content';
	if($('invest_form').style.display=='block') field_name = 'invest_form';
	if($('invest_media').style.display=='block') field_name = 'invest_media';
	if($('invest_download')) {
		if($('invest_download').style.display=='block') {
			$('invest_download').morph({'opacity': 0});
			$('invest_content').fade('hide');
			setTimeout("$('invest_download').style.display = 'none';",500);
			setTimeout("$('invest_content').style.display = 'block';",500);
			setTimeout("$('invest_content').morph({'opacity': 1});",500);
			$('resolution').morph({'opacity': 0});
			$('resolution').view = 'form';
			setTimeout("$('resolution').src = 'images/resolution_view_pdf.gif';",500);
			setTimeout("$('resolution').onclick = function() { swapInvContent('invest_form'); };",500);
			setTimeout("$('resolution').morph({'opacity': 1});",500);
		}
	}
	if(field_name!='') {
		$(field_name).morph({'opacity': 0});
		$(future_val).fade('hide');
		setTimeout("$('"+field_name+"').style.display = 'none';",500);
		setTimeout("$('"+future_val+"').style.display = 'block';",500);
		setTimeout("$('"+future_val+"').morph({'opacity': 1});",500);
		if(future_val=='invest_content') {
			if($('resolution').view!='form') {
				$('resolution').morph({'opacity': 0});
				$('resolution').view = 'form';
				setTimeout("$('resolution').src = 'images/resolution_view_pdf.gif';",500);
				setTimeout("$('resolution').onclick = function() { swapInvContent('invest_form'); };",500);
				setTimeout("$('resolution').morph({'opacity': 1});",500);
			} if($('media_button').view!='view') {
				$('media_button').morph({'opacity': 0});
				$('media_button').view = 'view';
				setTimeout("$('media_button').src = 'images/media.jpg';",500);
				setTimeout("$('media_button').onclick = function() { swapInvContent('invest_media'); };",500);
				setTimeout("$('media_button').morph({'opacity': 1});",500);
			} if($('page_title').view=='media') {
				$('page_title').morph({'opacity': 0});
				$('page_title').view = 'invest';
				setTimeout("$('page_title').src = 'images/title_invest.gif';",500);
				setTimeout("$('page_title').morph({'opacity': 1});",500);
			}
		} if(future_val=='invest_form') {
			$('resolution').morph({'opacity': 0});
			$('resolution').view = 'pdf';
			setTimeout("$('resolution').src = 'images/resolution_return.gif';",500);
			setTimeout("$('resolution').onclick = function() { swapInvContent('invest_content'); };",500);
			setTimeout("$('resolution').morph({'opacity': 1});",500);
			if($('media_button').view!='view') {
				$('media_button').morph({'opacity': 0});
				$('media_button').view = 'view';
				setTimeout("$('media_button').src = 'images/media.jpg';",500);
				setTimeout("$('media_button').onclick = function() { swapInvContent('invest_media'); };",500);
				setTimeout("$('media_button').morph({'opacity': 1});",500);
			}
			if($('page_title').view=='media') {
				$('page_title').morph({'opacity': 0});
				$('page_title').view = 'invest';
				setTimeout("$('page_title').src = 'images/title_invest.gif';",500);
				setTimeout("$('page_title').morph({'opacity': 1});",500);
			}
		} if(future_val=='invest_media') {
			if($('resolution').view!='form') {
				$('resolution').morph({'opacity': 0});
				$('resolution').view = 'form';
				setTimeout("$('resolution').src = 'images/resolution_view_pdf.gif';",500);
				setTimeout("$('resolution').onclick = function() { swapInvContent('invest_form'); };",500);
				setTimeout("$('resolution').morph({'opacity': 1});",500);
			}
			$('media_button').morph({'opacity': 0});
			$('media_button').view = 'return';
			setTimeout("$('media_button').src = 'images/return_invest.jpg';",500);
			setTimeout("$('media_button').onclick = function() { swapInvContent('invest_content'); };",500);
			setTimeout("$('media_button').morph({'opacity': 1});",500);
			if($('page_title').view=='invest') {
				$('page_title').morph({'opacity': 0});
				$('page_title').view = 'media';
				setTimeout("$('page_title').src = 'images/title_media.gif';",500);
				setTimeout("$('page_title').morph({'opacity': 1});",500);
			}
		}
	}
/*	if($('invest_content').style.display=='block') {
		$('invest_content').morph({'opacity': 0});
		$('invest_form').fade('hide');
		setTimeout("$('invest_content').style.display = 'none';",500);
		setTimeout("$('invest_form').style.display = 'block';",500);
		setTimeout("$('invest_form').morph({'opacity': 1});",500);
		$('resolution').morph({'opacity': 0});
		setTimeout("$('resolution').src = 'images/resolution_return.gif';",500);
		setTimeout("$('resolution').morph({'opacity': 1});",500);
	} else if($('invest_form').style.display=='block') {
		$('invest_form').morph({'opacity': 0});
		$('invest_content').fade('hide');
		setTimeout("$('invest_form').style.display = 'none';",500);
		setTimeout("$('invest_content').style.display = 'block';",500);
		setTimeout("$('invest_content').morph({'opacity': 1});",500);
		$('resolution').morph({'opacity': 0});
		setTimeout("$('resolution').src = 'images/resolution_view_pdf.gif';",500);
		setTimeout("$('resolution').morph({'opacity': 1});",500);
	} else if($('invest_download')) {
	}                                             */
}

function validateEmail(vEmail, vEmailValue) {
var err = 0;
if (vEmailValue=='') return true;
var invalidChars = '\/\'\\ ";:?!()[]\{\}^|';
for (i=0; i<invalidChars.length; i++) {
   if (vEmailValue.indexOf(invalidChars.charAt(i),0) > -1) err = 1;
}
for (i=0; i<vEmailValue.length; i++) {
   if (vEmailValue.charCodeAt(i)>127) err = 1;
}

var atPos = vEmailValue.indexOf('@',0);
if (atPos == -1) err = 1;
if (atPos == 0)  err = 1;
if (vEmailValue.indexOf('@', atPos + 1) > - 1)  err = 1;
if (vEmailValue.indexOf('.', atPos) == -1)  err = 1;
if (vEmailValue.indexOf('@.',0) != -1)  err = 1;
if (vEmailValue.indexOf('.@',0) != -1)  err = 1;
if (vEmailValue.indexOf('..',0) != -1)  err = 1;
var suffix = vEmailValue.substring(vEmailValue.lastIndexOf('.')+1);
if (suffix.length != 2 && suffix != 'com' && suffix != 'net' && suffix != 'org' && suffix != 'edu' && suffix != 'int' && suffix != 'mil' && suffix != 'gov' & suffix != 'arpa' && suffix != 'biz' && suffix != 'aero' && suffix != 'name' && suffix != 'coop' && suffix != 'info' && suffix != 'pro' && suffix != 'museum')  err = 1;
if(err)
	{
	alert("Email address in invalid");
	globalvar = vEmail;
	globalvar.value = '';
	setTimeout("globalvar.focus()",250);
	return true;
	}
return true;
}

function MobilePhoneFormat(vPhone, vPhoneValue){
   s = vPhoneValue;
   p = "";
   var i;
   for (i = 0; i < s.length; i++)
   	 {
     // Check that current character is number.
     var c = s.charAt(i);
     if (((c >= "0") && (c <= "9"))) p += c;
    }
	r = p.substring(0,4);
	if(p.length>4) r +=" "+p.substring(4,7);
	if(p.length>7) r +=" "+p.substring(7,s.length);
	vPhone.value = r;
   if(r.length==1&&r.substring(0,1)!="0") vPhone.value = "";
   if(r.length==2&&r.substring(0,2)!="04") vPhone.value = "0";
	return true;
	}

function MobilePhoneValidate(vPhone, vPhoneValue){
   s = vPhoneValue;
	if(s=="") return true;
   if(s.length!=12)
   	{
	alert("Mobile phone numbers must contain 10 digits");
	globalvar = vPhone;
	globalvar.value = '';
	setTimeout("globalvar.focus()",250);
	return false;
	}
   if(s.substring(0,2)!="04")
   	{
	alert("Mobile phone numbers must start with 04");
	globalvar = vPhone;
	globalvar.value = '';
	setTimeout("globalvar.focus()",250);
	return false;
	}
	return true;
	}

function PhoneFormat(vPhone, vPhoneValue) {
   s = vPhoneValue;
   p = "";
   var i;
   for (i = 0; i < s.length; i++)
   	 {
     // Check that current character is number.
     var c = s.charAt(i);
     if (((c >= "0") && (c <= "9"))) p += c;
    }
	if(p.substring(0,1)=='1') { //1300 number
		r = p.substring(0,4);
		if(p.length>4) r +=" "+p.substring(4,7);
		if(p.length>7) r +=" "+p.substring(7);
		}
	else {
	    var c = s.charAt(2);
    	if (c == "0") p = p.substring(0,2);
		r = p.substring(0,2);
		if(p.length>2) r +=" "+p.substring(2,6);
		if(p.length>6) r +=" "+p.substring(6,s.length);
		}
	vPhone.value = r;
   if(r.length==1&&r.substring(0,1)!="0"&&r.substring(0,1)!="1") vPhone.value = "";
   if(r.length==2&&(r.substring(0,2)!="13"&&r.substring(0,2)!="02"&&r.substring(0,2)!="03"&&r.substring(0,2)!="07"&&r.substring(0,2)!="08")) vPhone.value = "0";
	return true;
	}

function PhoneValidate(vPhone, vPhoneValue) {
   s = vPhoneValue;
	if(s=="") return true;
   if(s.length<12)
   	{
	alert("Home Phone numbers must contain at least 10 digits");
	globalvar = vPhone;
	globalvar.value = '';
	setTimeout("globalvar.focus()",250);
	return false;
	}
   if(s.substring(0,2)!="13"&&s.substring(0,2)!="18"&&s.substring(0,2)!="02"&&s.substring(0,2)!="03"&&s.substring(0,2)!="07"&&s.substring(0,2)!="08")
   	{
	alert("Home Phone numbers must start with an area code");
	globalvar = vPhone;
	globalvar.value = '';
	setTimeout("globalvar.focus()",250);
	return false;
	}
	return true;
	}

function loadVideo() {
	document.documentElement.style.overflow = 'hidden';
	document.documentElement.scrollTop = '0px';
	var page_width = parseInt(document.documentElement.clientWidth);
	var page_height = parseInt(document.documentElement.clientHeight);

	var obj = document.getElementById('image_div');
	var div_width = parseInt(obj.style.width);
	var div_height = parseInt(obj.style.height);

	var prevleftOff = Math.round((page_width - div_width)/2);
	var newleftOff = Math.round((page_width - 540)/2);
	var prevtopOff = Math.round((page_height - div_height)/2);
	var newtopOff = Math.round((page_height - 327)/2);

	$('image_div').style.display = 'block';
	$('blackout').style.display = 'block';
	$('blackout').style.width = page_width+'px';
	$('blackout').style.height = page_height+'px';
	$('image_div').style.top=prevtopOff+'px';
	$('image_div').style.left=prevleftOff+'px';
	$('blackout').morph({'opacity': 0.85});
	$('image_div').morph({'opacity': 1});
	$('image_div').style.border = '10px solid #FFFFFF';
	setTimeout("$('image_div').morph({'left': '"+newleftOff+"px','width': '512px'});",500);
	setTimeout("$('image_div').morph({'top': '"+newtopOff+"px','height': '305px'});",1000);
	setTimeout("loadVideoFrame()",1500);
}

function loadVideoFrame() {
	var ifram = document.createElement("iframe");
	ifram.width = 512;
	ifram.height = 305;
	ifram.frameBorder = 0;
	ifram.scrolling = 'no';
	ifram.marginHeight = 0;
	ifram.marginWidth = 0;
	ifram.style.display = 'block';
	ifram.style.margin = '0px';
	ifram.style.padding = '0px';
	ifram.src = 'video.html';
	$('image_div').appendChild(ifram);
}

function closeVideo() {
	$('blackout').morph({'opacity': 0,'moz-opacity': 0});
	$('image_div').morph({'opacity': 0});
	$('image_div').innerHTML = '';
	document.body.style.overflow = 'auto';
	setTimeout("$('blackout').style.display = 'none';",500);
	setTimeout("$('image_div').style.display = 'none';",500);
	setTimeout("$('image_div').style.width = '200px';",500);
	setTimeout("$('image_div').style.height = '80px';",500);
	setTimeout("$('image_div').style.background = '#FFFFFF url(images/loading.gif) no-repeat scroll top left';",500);
}