imagename = '';
title = '';
currLinks = 'links1';
mainLinks = 'projectLinks1';

function swapInfo( targetID ) {
	if (document.getElementById) {
		target = document.getElementById( current );
		target.style.display = "none";
		
		target = document.getElementById( targetID );
		target.style.display = "";
		current = targetID;
	}
}


function swapLinks( targetID ) {
	if (document.getElementById) {
		target = document.getElementById( currLinks );
		target.style.display = "none";
		
		target = document.getElementById( targetID );
		target.style.display = "";
		currLinks = targetID;
	}
}

function swapMainLinks( targetID ) {
	if (document.getElementById) {
		target = document.getElementById( mainLinks );
		target.style.display = "none";
	
		target = document.getElementById( targetID );
		target.style.display = "";
		mainLinks = targetID;
	}
}

function changeImages() {
	if (document.images) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

function spawnWindow(winurl,name) {
	var settings = 'height=300, width=300, top=0, left=0, toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no';
	lrgewin = window.open("about:blank","", settings);
	imagename = winurl;
	title = name;
	setTimeout('update()',5);
}

function update() {
    doc = lrgewin.document;
    doc.open('text/html');
    doc.write('<html><head><title>' + title + '<\/title>');
    doc.write('<script language=\'javascript\'>');
	doc.write('var NS =(navigator.appName=="Netscape")?true:false;');
	doc.write('function fitpic() {');
	doc.write('iWidth = (NS)?window.innerWidth:document.body.clientWidth;');
    doc.write('iHeight = (NS)?window.innerHeight:document.body.clientHeight;');
    doc.write('iWidth = document.images[0].width - iWidth;');
    doc.write('iHeight = document.images[0].height - iHeight;');
    doc.write('window.resizeBy(iWidth, iHeight);');
    doc.write('self.focus();');
    doc.write('};');
	doc.write('<\/script>');
	doc.write('<\/head>');
	doc.write('<body bgcolor="#ffffff" onload="fitpic();" topmargin="0" marginheight="0" leftmargin="0" marginwidth="0">');
	doc.write('<img src="' + imagename + '" border="0" \/>');
	doc.write('<\/body><\/html>');
    doc.close();
}

function LoadNav( swfPath, jpgPath ) { 
	document.write('<object type="application/x-shockwave-flash" data="' + swfPath + '" width="300" height="150">\n');
	document.write('<param name="movie" value="' + swfPath + '" />\n');
	document.write('<param name="menu" value="false" />\n');
	document.write('<img src="' + jpgPath + '" width="300" height="150" alt="" title="" />\n');
	document.write('</object>\n');
}
function Detect() {
	document.write('<object type="application/x-shockwave-flash" data="flash_detection.swf?flashContentURL=main.html&altContentURL=architen-landrell-sitemap.html&contentVersion=6&contentMajorRevision=0&contentMinorRevision=0&allowFlashAutoInstall=false" width="1" height="1">\n');
	document.write('<param name="movie" value="http://www.panvision.co.th/flash_detection.swf?flashContentURL=main.html&amp;altContentURL=architen-landrell-sitemap.html&amp;contentVersion=6&amp;contentMajorRevision=0&amp;contentMinorRevision=0&amp;allowFlashAutoInstall=false" />\n');
	document.write('<param name="quality" value="low" />\n');
	document.write('<param name="bgcolor" value="#a5a5a5" />\n');
	document.write('</object>\n');
}

function LoadMenu() {
	document.write('<object type="application/x-shockwave-flash" data="main.swf" id="movie" width="530" height="370">\n');
	document.write('<param name="movie" value="http://www.panvision.co.th/main.swf" />\n');
	document.write('<param name="menu" value="false" />\n');
	document.write('</object>\n');
}