// JavaScript Document
<!--
<!--

// Function: popup(page, width, height)
// Description: Function to pop up a new window
// Creation Date: 11/09/05
//
// Notes: 
// 
function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}


function popup(page, width, height) {
	window.open(page,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+width+',height='+height+',left=100,top=100');
}
//-->

function sto_containers(image, myText) {
	parent.document['my_photo'].src = image;
	parent.document.getElementById('text_div').innerHTML = myText;
}

function mo_offices(image, img_flo, myText) {
	parent.document['my_photo'].src = image;
	parent.document['floorplan'].src=img_flo;
	parent.document.getElementById('text_div').innerHTML = myText;
}

function change_photo(image) {
	parent.document['my_photo'].src = image;
}

function pop_applications(section) {
	if(section == "modular_buildings")
		window.open('applications.html','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=400,height=200,left=30,top=30');
	else if (section == "storage_containers")
		window.open('storage_containers_applications.html','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=400,height=200,left=30,top=30');
}

function pop_gallery(section) {
	if(section == "modular_buildings")
		window.open('modular_buildings_photo_gallery.html','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=600,height=400,left=30,top=30');
	else if(section == "mobile_offices")
		window.open('mobile_offices_photo_gallery.html','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=600,height=400,left=30,top=30');
	else if(section == "storage_containers")
		window.open('storage_containers_photo_gallery.html','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=600,height=400,left=30,top=30');
	else if(section == "classrooms")
		window.open('classrooms_photo_gallery.html','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=600,height=400,left=30,top=30');
}

function applications(image) {
	document['app_pic'].src=image;
}

	function move_in(txt_area_num,img_name,img_src,heading_txt,img_txt) {
        document[img_name].src=img_src;
		var newtext = document.createTextNode(img_txt);
		var newheading = document.createTextNode(heading_txt);
		
		if(txt_area_num == 1){
			var txt1 = document.getElementById("txt1");
			var heading1 = document.getElementById("heading1");
		}
		else{
			var txt1 = document.getElementById("txt2");
			var heading1 = document.getElementById("heading2");
		}
		
		if(txt1.firstChild == null)
			txt1.appendChild(newtext);
		else
			txt1.firstChild.nodeValue=img_txt;
			
		if(heading1.firstChild == null)
			heading1.appendChild(newheading);
		else
			heading1.firstChild.nodeValue=heading_txt;
    }

    function move_out(txt_area_num,img_name,img_src) {
        document[img_name].src=img_src;
		if(txt_area_num == 1){
			var txt1 = document.getElementById("txt1");
			var heading1 = document.getElementById("heading1");
		}
		else{
			var txt1 = document.getElementById("txt2");
			var heading1 = document.getElementById("heading2");
		}
		//txt1.firstChild.nodeValue=img_txt;		
		//heading1.firstChild.nodeValue=heading_txt;
    }

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


//-->	