// Default javascript function file - Double M Enterprises, Genemarcum.com
// Created May 4, 2004
// Andy Schubert of On Purpose Design -- http://www.onpurposedesign.com

dw('<meta http-equiv="imagetoolbar" content="no">');

var locmap = ('http://us.rd.yahoo.com/maps//maps/extmap/*-http://maps.yahoo.com//maps_result?csz=West+Valley+City%2C+UT+84119-1325&state=UT&uzip=84119&ds=n&name=&desc=&ed=gif4MOp_0TrYaUpaTVM6MJlgMyUV_swkZvzVeCF0OX3FVWBgzMO4KEeZZ8vHWmv9t7CmTLShDCDw0G_PaDnm_88gUZM87AgzHGxMhGxG.GE9zg--&zoomin=yes&BFKey=&mag=9');
var ddmap = ('http://us.rd.yahoo.com/maps//maps/extDD/*-http://maps.yahoo.com//dd?taddr=2163+W+2200+S&tcsz=West+Valley+City%2C+UT+84119-1325&country=us');

// Global Functions // 

function dw(n) {document.write(n);}

function gohere(n) {window.location.href=n;}

function specialfeature() {
dw('<p><img src="images/sf_icon26.jpg" onclick=window.location.href="http://double-m-enterprises.smugmug.com" alt="New Gallery" /><br /><br />We now have a full featured Gallery!</p>');
}

function didyouknow(){
today = new Date();
day = today.getDay();
day = day+1;

// Sunday=1, Monday=2, etc. // 

if (day == "1" || day == "6") {
dw('<p>Using galvanized steel for projects in or near water is the best way to ensure that your project remains rust free, ensuring longer steel life and high strength.</p>');
}
else if (day == "2" || day == "7") {
dw('<p>CO<sup>2</sup> is very dangerous to work with. Concentrations of CO<sup>2</sup> can displace oxygen in the lungs, resulting in loss of consciousness in less than a minute and respiratory arrest within 5 minutes.</p>');
}
else if (day == "3") {
dw('<p>Custom lighting made for your home <b>MUST BE</b> UL certified. If a faulty light fixture resulted in a fire, the lack of UL certification could void your insurance coverage. If you have custom lighting made for your home, take the steps necessary to get them UL listed.</p>');
}
else if (day == "4") {
dw('<p>Aluminum melts at only 1220&deg; F. Compare that to steel which melts at around 2800 degrees F. However, at the melting point of aluminum, steel loses over 40% of its strength.</p>');
}
else  {
dw('<p>Double M provides a wide variety of services including custom steel railing, gates, and fences. Call us at 801-971-6154 to find out more.</p>');
}
} 

function leftcolumn() {
dw('<div id="contentleft">');
dw('<div class="leftbox">');
dw('<h1 class="special_feature">new feature</h1>');
specialfeature();
dw('</div>');
dw('<div class="leftbox">');
dw('<h1 class="contactus">contact us</h1>');
dw('<p>We\'re ready for your next project. Give us a call!<br><br>Double M Enterprises<br>2160 W. 1700 S.<br />Salt Lake City, UT<br />84104-4236<br><b>801-971-6154</b></p>');
dw('</div>');
dw('</div>');
}

function rightcolumn(n) {

	if (n == "right") {
	dw('<div id="contentright">');
	dw('<div class="rightbox">');
	dw('<h1>more site contents</h1>');
	dw('<div class="linkset">');
//	dw('<a href="#" onclick="javascript:offsitelink(locmap);" class="sectionlinkitem">Location Map</a>'); //
//	dw('<a href="#" onclick="javascript:offsitelink(ddmap);" class="sectionlinkitem">Driving Directions</a>'); //
	dw('<a href="http://double-m-enterprises.smugmug.com/Just%20For%20Fun!" class="sectionlinkitem">Just For Fun</a>');
	dw('</div>');
	dw('</div>');
	dw('<div class="leftbox">');
dw('<h1 class="didyouknow">did you know?</h1>');
didyouknow();
dw('</div>');
	dw('</div>');
	}
	else {}
}

function runninglinks() {
dw('<ul class="runninglinks">');
dw('<li><a href="index.html">Home</a></li>');
dw('<li><a href="aboutus.html">About Us</a></li>');
dw('<li><a href="services.html">Services</a></li>');
dw('<li><a href="clients.html">Clients</a></li>');
dw('<li><a href="http://double-m-enterprises.smugmug.com">Gallery</a></li>');
dw('<li><a href="links.html">Links</a></li>');
dw('<li><a href="contact.html">Contact Us</a></li>');
dw('</ul>');
}

function pagefooter() {
dw('<p class="calltoday">Call Us Today</p>');
dw('<p class="pagephone">801-971-6154</p>');
}

function pagetop() {
dw('<div id="contentheader"><span class="banner_domain">doublementerprises.com</span></div>');
dw('<div id="menuheader"><script type="text/javascript">runninglinks();</script></div>');
}

function writecontactlink(n) {
var sdomain = "@doublementerprises.com"
dw('<a href="mailto:'+n+''+sdomain+'">'+n+''+sdomain+'</a>');
}

function offsitelink(page1) {
dw('<frameset cols="100,*">');
dw('<frame name="left" src="backtodm.html" marginwidth="10" marginheight="10" scrolling="no" frameborder="0" noresize />');
dw('<frame name="right" src="'+page1+'" marginwidth="10" marginheight="10" scrolling="auto" frameborder="0" />');
dw('</frameset>');
}

function returnonsite() {
window.parent.location.href = 'index.html';
}

// Popup Windows with self close onClick or onBlur - for images // 
function ViewImage(ifile,ix,iy,ititle) { 
var win;
var sWidth;
var sHeight;
var NS = (document.layers) ? 1 : 0;
win = window.open("","imageviewer","width="+ix+",height="+iy+",menubar=no,toolbar=no");
if (NS) {
sWidth = win.innerWidth;
sHeight = win.innerHeight;
} else {
sWidth = win.document.body.clientWidth;
sHeight = win.document.body.clientHeight;
}
if(sWidth!=ix || sHeight!=iy) {
win.close();
setTimeout("ViewImage('"+ifile+"',"+ix+","+iy+",'"+ititle+"')", 250);
return;
}
win.document.open();
win.document.write("<html><head><title>"+ititle+"</title>");
win.document.write("</head><body onblur='javascript:window.close()'>");
win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">');
win.document.write("<a href='javascript:window.close()'><img src="+ifile+" border=0 alt='click to close'></a></div></body></html>");
win.document.close();
}

function writegallery(v) {
var count=0;
photoitem = new Array();   // initialize Array 

function pg(a, b, c){
 	photoitem[count]= new Array(2);
	photoitem[count].imagenumber=a;
	photoitem[count].caption=b;
	photoitem[count].orientation=c;
 	count++;
}

var z;

if (v == "gallery10") 
	{
var gallerytitle = "Interiors / Park City";
var gallerydesc = "The client wanted to replace some solid wood handrails with a steel railing that would be compatible with an existing complex steel sculpture that decorates either side of the main staircase.";
pg('1001','Tough act to follow...','land');
pg('1002','Tough act to follow...','land');
pg('1003','An artistic complement.','port');
pg('1004','Tough act to follow...','land');
pg('1005','Tough act to follow...','land');
pg('1006','Tough act to follow...','land');
	}

else if (v == "gallery11") 
	{
var gallerytitle = "Silvertip / Avenues 1";
var gallerydesc = "Concrete work, steel work, and general construction. This was a big project.";
pg('1113','','land');
pg('1112','','port');
pg('1111','','land');
pg('1110','','land');
pg('1114','','land');
pg('1115','','land');
pg('1116','','port');
	}
	
else if (v == "gallery12") 
	{
var gallerytitle = "Silvertip / Avenues 2";
var gallerydesc = "Double M ironwork was to complement concrete work and general construction. This was a large renovation project.";
pg('1201','Courtyard gate next to carriage house.','land');
pg('1202','Natural rust patina finish.','land');
pg('1203','Shot taken before solid brass top cap was added.','land');
pg('1204','','land');
pg('1205','','land');
pg('1209','Ameristar / Majestic Ornamental Fence','land');
pg('1210','','land');
	}

else if (v == "gallery13")
	{
var gallerytitle = "Brighton Ski Resort Condo";
var gallerydesc = "Two inch square woven wire mesh painted silver.";
pg('1301','','land');
pg('1302','','land');
pg('1303','Look close for the gate.','land');
pg('1304','See the gate?','land');
pg('1306','Stair railing core drilled into granite.','land');
pg('1307','','land');
pg('1308','Pipe and cable trusses.','land');
pg('1309','Serious architectural feature.','land');
pg('1310','','land');
pg('1311','','land');
pg('1312','','land');
pg('1313','','land');
pg('1314','One inch plate mortised into timbers.','port');
pg('1315','','land');
	}
	
else if (v == "gallery14")
	{
var gallerytitle = "Solitude Ski Resort Condo";
var gallerydesc = "Moment framing, construction, and steel floor supports on a steep sloped condominium lot.";
pg('1401','Standing the red iron.','land');
pg('1402','Couldn\'t have picked a nicer place for a job.','land');
pg('1403','Hard to see the red iron through the gorgeous work location.','land');
pg('1404','','land');
pg('1405','','land');
pg('1406','Moment frame.','land');
pg('1407','Pete rolls up after setting the arch.','land');
pg('1408','','land');
pg('1409','','land');
pg('1410','Moment frame standing by itself.','land');
pg('1411','Joist and deck installed.','land');
pg('1412','','land');
pg('1413','','land');
pg('1414','','land');
pg('1415','','land');
pg('1417','','land');
pg('1418','','land');
	}
	
else if (v == "gallery15")
	{
var gallerytitle = "Kamas / Garff Ranches Signage";
var gallerydesc = "Special signage made for the entrance to these exclusive residential properties.";
pg('1503','4\' x 8\' sign, core 10 steel with laser cutout and black powder coated edge trim.','land');
pg('1504','','land');
	}

else if (v == "gallery16")
	{
var gallerytitle = "Fireplace and Tools";
var gallerydesc = "Custom fireplace for an upscale residence and complementary fireplace tools.";
pg('1601','','port');
pg('1602','Hand forged steel fireplace doors with copper screen.','land');
pg('1603','','land');
	}

else if (v == "gallery17")
	{
var gallerytitle = "Snowmobile Trailer";
var gallerydesc = "Custom trailer especially designed for hauling snowmobiles.";
pg('1701','','land');
pg('1702','','land');
pg('1703','','land');
pg('1704','','land');
pg('1705','','land');
pg('1706','','land');
pg('1707','','land');
pg('1708','','land');
	}

else if (v == "gallery18")
	{
var gallerytitle = "Colony Railing";
var gallerydesc = "This steel railing has a rusticated hammered iron finish that will last for years on the exterior of this home.";
pg('1801','Hand forged from solid bar stock.','land');
pg('1802','','land');
pg('1803','','land');
pg('1804','','land');
pg('1805','','land');
pg('1806','','land');
pg('1807','','land');
pg('1808','','land');
pg('1809','','land');
	}
	
else if (v == "gallery20")
	{
var gallerytitle = "Willow Creek / Park City";
var gallerydesc = "Entrance signage for Willow Creek.";
pg('2001','Laser cut core 10 4\' x 8\' sheet, scalloped edges.','land');
pg('2002','','land');
	}

else if (v == "gallery21")
	{
var gallerytitle = "Customized Work Truck";
var gallerydesc = "We can modify your vehicle to accomodate your work needs.";
pg('2101','','land');
pg('2102','','land');
pg('2103','','land');
pg('2104','','land');
pg('2105','','land');
pg('2106','','land');
	}

else if (v == "gallery22")
	{
var gallerytitle = "Tree Railing / Park City";
var gallerydesc = "We created a wood bark appearance on a steel rail for this residence in Park City.";
pg('2201','','land');
pg('2202','','land');
pg('2203','','land');
pg('2204','','land');
pg('2205','','port');
pg('2206','','land');
pg('2207','','port');
pg('2208','','land');
pg('2209','','land');
pg('2210','','land');
	}

else if (v == "gallery24")
	{
var gallerytitle = "Shop Projects";
var gallerydesc = "Various items that serve as examples of things we make.";
pg('2409','','land');
pg('2410','Letter holder.','land');
pg('2411','Pete shows off some of his forging skills.','land');
pg('2412','','land');
pg('2413','Spice Rack','land');
pg('2414','Spice Rack','land');
	}

else if (v == "gallery25")
	{
var gallerytitle = "Steel Dinosaur";
var gallerydesc = "One of our favorite custom projects.";
pg('2501','"Earl"','land');
pg('2502','Earl and his brother.','land');
pg('2503','','land');
pg('2504','','land');
pg('2505','','land');
	}

else if (v == "gallery26")
	{
var gallerytitle = "Interiors / Colony";
var gallerydesc = "Custom work throughout the home.";
pg('2604','','land');
pg('2603','','land');
pg('2601','Steel tree stump with granite top for the wine room.','port');
pg('2602','Steel tree stump with granite top for the wine room.','port');
pg('2605','Grand staircase - hand forged from solid steel','land');
pg('2606','Grand staircase','land');
pg('2607','Grand staircase','land');
pg('2608','Grand staircase','land');
pg('2609','Grand staircase','land');
pg('2610','Hand hammered copper with steel band and brass rivet (wall cap)','land');
pg('2611','Hand hammered copper with steel band and brass rivet (wall cap)','land');
pg('2612','Hand forged from solid steel bar stock','port');
pg('2614','Hand forged from solid steel bar stock','port');
pg('2615','Hand forged from solid steel bar stock','port');
pg('2619','Hand forged from solid steel bar stock','land');
pg('2616','Hand hammered copper wall cap with steel banding and brown patina','port');
pg('2617','Copper wall cap','land');
pg('2618','Copper wall cap','land');
pg('2620','Copper wall cap','land');
pg('2621','Copper wall cap','land');
pg('2622','Hand forged light fixture','port');
pg('2623','Hand forged light fixture','land');
pg('2624','Hand forged light fixture','port');
pg('2625','Hand forged light fixture','port');
pg('2626','Hand forged light fixture','port');
pg('2628','Hand hammered copper sconce','port');
pg('2629','Hand hammered copper sconce','port');
pg('2630','Hand hammered copper sconce','port');
pg('2631','Hand hammered copper sconce','port');
pg('2632','Hand hammered copper sconce','port');
pg('2633','Hand hammered copper sconce','port');
pg('2634','Hand hammered copper sconce','port');
pg('2637','Hand forged steel with hammered copper and brown patina fireplace - custom fireplace tools','land');
pg('2638','Yes, those are steel pine cones. We make those!','land');
pg('2639','We don\'t buy them, we make \'em!','land');
pg('2640','Range hood - copper and steel range hood on Viking(tm) appliances','land');
pg('2641','Range hood','port');
pg('2642','Range hood','land');
pg('2643','Range hood','port');
pg('2644','Range hood','land');
pg('2645','Bathroom accessories','land');
pg('2646','Bathroom accessories','land');
pg('2647','Bathroom accessories','land');
pg('2648','Bathroom accessories','land');
pg('2649','Bathroom accessories','port');
pg('2650','Powder room basin and towel rack - steel with granite basin. Really note the detail in this project, from the half stump back with the fixtures on top, to the detailed branches that serve as towel racks, complete with copper pine needs and steel pine cones.','port');
pg('2651','','port');
pg('2652','','port');
pg('2653','','port');
pg('2654','','port');
pg('2655','','land');
pg('2656','','port');
pg('2657','','land');
pg('2658','','land');
pg('2659','','port');
pg('2660','','land');
pg('2661','','land');
pg('2662','Note the plumbing coming out of the top of the tree.','land');
	}

else if (v == "gallery27")
	{
var gallerytitle = "Pearson / Avenues";
var gallerydesc = "Several varieties of railing work in this residence.";
pg('2701','','land');
pg('2713','Glass and aluminum railing on a curved staircase.','land');
pg('2714','','land');
pg('2715','','land');
pg('2716','Mirror polish stainless steel grab rail at entrance.','land');
pg('2717','Mirror polish stainless steel rail','land');
pg('2718','Mirror polish stainless steel rail','land');
pg('2719','Mirror polish stainless steel rail','port');
pg('2721','Mirror polish stainless steel rail','port');
pg('2722','Mirror polish stainless steel rail','port');
pg('2723','Mirror polish stainless steel rail','port');
pg('2729','Mirror polish stainless steel rail','land');
pg('2730','Mirror polish stainless steel rail','land');
pg('2720','Mirror polish stainless steel counter tops','land');
pg('2724','Lipstick red grab rail to child\'s playroom.','land');
pg('2725','We built the polished stainless steel standoff risers.','land');
pg('2726','','land');
pg('2727','Outdoor staircase','land');
pg('2728','Outdoor staircase','land');
pg('2731','Outdoor staircase','port');
	}
	
else if (v == "gallery28")
	{
var gallerytitle = "Deer Crest - Lot 74";
var gallerydesc = "Two primary varieties of rail on this residence. The outdoor rail is uniform and geometric. The interior rail is designed to look more natural, like twigs, branches, pine cones, and tree stumps with branches growing out of them.";
pg('2801','','land');
pg('2802','','port');
pg('2803','','land');
pg('2804','','land');
pg('2805','','land');
pg('2806','','land');
pg('2807','','land');
pg('2808','','land');
pg('2809','','land');
pg('2810','','land');
pg('2811','','land');
pg('2812','','land');
pg('2813','','port');
pg('2814','','land');
pg('2815','','land');
pg('2816','','port');
pg('2817','','land');
pg('2818','','port');
pg('2819','','land');
pg('2820','','land');
pg('2821','','land');
pg('2822','','land');
pg('2823','','land');
	}
	
else if (v == "gallery29")
	{
var gallerytitle = "Working At The Forge";
var gallerydesc = "Troy Speer Hand Forging Railing Components";
pg('2901','','land');
pg('2902','','land');
pg('2903','','land');
pg('2904','','land');
pg('2905','','land');
pg('2906','','land');
pg('2907','','land');
pg('2908','','port');
pg('2909','','land');
pg('2910','','land');
pg('2911','','land');
pg('2912','We always thought Troy was a big Rusty Wallace fan.','land');
pg('2913','','land');
pg('2914','','land');
pg('2915','','land');
pg('2916','','land');
pg('2917','','land');
pg('2918','','land');
pg('2919','','land');
pg('2920','','land');
pg('2921','','land');
pg('2922','','land');
pg('2923','','land');
pg('2924','','land');
pg('2925','','land');
pg('2926','','land');
pg('2927','','land');
pg('2928','','land');
pg('2929','','land');
	}	

else if (v == "gallery30")
	{
var gallerytitle = "Schumacher Solomere";
var gallerydesc = "Silver birch rail is achieved by hand grinding the finish to bring out very realistic details.";
pg('3000','','land');
pg('3001','','land');
pg('3002','','land');
pg('3003','','land');
pg('3004','','land');
pg('3005','','port');
pg('3006','','land');
pg('3007','','port');
pg('3008','','port');
pg('3009','','port');
pg('3010','','port');
pg('3011','','land');
pg('3012','','land');
	}	

else if (v == "gallery99")
	{
var gallerytitle = "Just For Fun";
var gallerydesc = "We work hard but we also know how to play hard. Here are some pictures of us just enjoying life.";
pg('9901','Vacationing at Disneyland','land');
pg('9902','Vacationing at Disneyland','land');
pg('9903','Vacationing at Disneyland','land');
pg('9904','Group shot in front of the Main Street Train Station at Disneyland. I\'m the one who can hardly contain myself. You just can\'t imagine how excited I am to be at Disneyland. I nearly wet myself.','land');
pg('9905','Vacationing at Disneyland','land');
pg('9912','Thanksgiving with family.','land');
pg('9906','Yellowstone National Park','land');
pg('9907','Cheryl, have you been here before?','land');
pg('9908','Yellowstone','land');

// get elk outside of truck window and add here.//
pg('9909','','land');
pg('9910','','land');
pg('9911','My wife, Cheryl, takes her little brother out for his first snowmobile ride.','land');
pg('9913','','land');
pg('9914','Can you see Jonathan grinning from ear to ear?','land');
	}	
	
dw('<h1>'+gallerytitle+'</h1>');
dw('<p>'+gallerydesc+'</p>');
	for(z=0; z <= (photoitem.length - 1); z++){

		if (''+photoitem[z].orientation== "land")
		{	
		dw('<div class="polaroid"><a href="javascript:ViewImage(\'images/large/'+photoitem[z].imagenumber+'.jpg\',640,480,\'Double M\')" style="border:0px;"><img src="images/reg/'+photoitem[z].imagenumber+'.jpg" border="0" alt="'+photoitem[z].caption+' - ('+photoitem[z].imagenumber+')"></a></div>');
			if (''+photoitem[z].caption== "")
		{dw('<div class="polaroidcaption">'+photoitem[z].caption+'&copy;2003 - 2005, Double M Enterprises</div>');}
			else
		{dw('<div class="polaroidcaption">'+photoitem[z].caption+'<br><br>&copy;2003 - 2005, Double M Enterprises</div>');}
		}
		else if (''+photoitem[z].orientation== "port")
		{
		dw('<div class="polaroidport"><a href="javascript:ViewImage(\'images/large/'+photoitem[z].imagenumber+'.jpg\',480,640,\'Double M\')" style="border:0px;"><img src="images/reg/'+photoitem[z].imagenumber+'.jpg" border="0" alt="'+photoitem[z].caption+' - ('+photoitem[z].imagenumber+')"></a></div>');
			if (''+photoitem[z].caption== "")
		{dw('<div class="polaroidcaptionport">'+photoitem[z].caption+'&copy;2003 - 2005, Double M Enterprises</div>');}
			else
		{dw('<div class="polaroidcaptionport">'+photoitem[z].caption+'<br><br>&copy;2003 - 2005, Double M Enterprises</div>');}
		}
	}
}
