// JavaScript Document//set style on loadfunction applyStyleString(obj,str) {	if(document.all && !window.opera) {		obj.style.setAttribute("cssText",str);	} else {		obj.setAttribute("style",str);	}}//innerHTML swap contentfunction replaceContent (append, replace) {	document.getElementById(replace).innerHTML = document.getElementById(append).innerHTML;	//applyStyleString(document.getElementById("topArrow"),"display:none");}function display_painting (file,orientation,width,height,title,dimensions,medium,award,status) {	//create/update variables	//display = document.getElementById("display");	//displayed_image = document.getElementById("displayed_image");	//displayed_description = document.getElementById("displayed_description");	if (award != "") {		award = award+"<br />"	}	if (status != "") {		status = "<span class=\"status\">"+status+"</span>"	}	//update image padding depending on orientation of image	var_orientation = orientation;	left_width = width*1;	left_width = left_width + 25;		var adjustedPadding = 0;	if (height < 400) {		adjustedPadding = (400 - height)/2;	}		switch (var_orientation){	case "landscape": 		left_width = left_width + 209;		left_width = "left:"+left_width+"px";		description_style = left_width+';padding-bottom:'+adjustedPadding+'px;';		image_style = 'padding:0 0 '+adjustedPadding+'px 209px;';		 		applyStyleString(document.getElementById("displayed_image"),image_style);		applyStyleString(document.getElementById("displayed_description"),description_style);		break;	case "portrait": 		left_width = left_width + 259;		left_width = "left:"+left_width+"px";		applyStyleString(document.getElementById("displayed_image"),"padding:0 0 0 259px");		applyStyleString(document.getElementById("displayed_description"),left_width);		break;	default : applyStyleString(displayed_image,"padding:0 0 0 259px");	}	//update innerHTML to disploay image and text	document.getElementById("displayed_image").innerHTML = '<img src="../../images/portfolio/'+file+'" title="'+title+'"alt="'+title+'" width='+width+' height='+height+' />';	document.getElementById("displayed_description").innerHTML = title+'<br />'+dimensions+'<br />'+medium+'<br />'+award+status;}