function redirectPath() { 
  re = /((www.)?musicman5.smugmug.com)/; 
  tmp = window.location.href; 
  if (re.test(tmp)) { 
    tmp = tmp.replace(re, 'www.musicman5photos.com'); 
    window.location.href = tmp; 
  } 
}
redirectPath();  


var g_rotateCntr = 0;
var g_rotateStopped = false;
function doOnLoad()
{
 doRotate();
 incrRotateCntr();
 window.setInterval("rotateLogoImgs();", 10000);
} 
 
var g_logoImgs = new Array();
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/70212686-Th.jpg"; // Hat shot
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/318283835_UEEHC-Th-1.jpg"; // Little Sally
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/163719851_QLgYc-Th-2.jpg"; // Little Shop of Horrors
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/78758477-Th.jpg"; // June
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/43722320-Th.jpg"; // Wicked
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/58513374-Th.jpg"; // Sax Quintet
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/70365392-Th.jpg"; // Hello Dolly!
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/482018781_5y5nA-Th-2.jpg"; // Jazz
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/175694156-Th.jpg"; // Music Man
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/175680047-Th.jpg"; // Music Man
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/316272036_C7qga-Th-2.jpg"; // Urinetown
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/70520592-Th.jpg"; // NCHS Sax Quintet
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/180244503-Th.jpg"; // Camp2007a
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/76948008-Th.jpg"; // Stretch
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/104252595-Th.jpg"; // ISU1
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/87324014-Th.jpg"; // Camp2006
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/104252748-Th.jpg"; // ISU2
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/121352872-Th.jpg"; // RonJon
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/121354776-Th.jpg"; // Kite
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/121354316-Th.jpg"; // Beach
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/179769981-Th.jpg"; // Camp2007b
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/179770119-Th.jpg"; // Camp2007c
g_logoImgs[g_logoImgs.length] = "http://www.musicman5photos.com/photos/180246254-Th.jpg"; // Camp2007d 



 
function incrRotateCntr()
{
 // _setCookie("R_CNTR", g_rotateStopped ? "-"+g_rotateCntr : "+"+g_rotateCntr);
 g_rotateCntr++;
}
 
function doRotate()
{
 var div1 = document.getElementById("ml_1");
 var div2 = document.getElementById("ml_2");
 var div3 = document.getElementById("ml_3");
 var div4 = document.getElementById("ml_4");
 
 var aLen = g_logoImgs.length;
 div1.style.backgroundImage="url("+ g_logoImgs[(0+g_rotateCntr)%aLen] +")";
 div2.style.backgroundImage="url("+ g_logoImgs[(1+g_rotateCntr)%aLen] +")";
 div3.style.backgroundImage="url("+ g_logoImgs[(2+g_rotateCntr)%aLen] +")";
 div4.style.backgroundImage="url("+ g_logoImgs[(3+g_rotateCntr)%aLen] +")";
}
 
function rotateLogoImgs()
{
 if (g_rotateStopped)
  return;
 
 var div4 = document.getElementById("ml_4");
 var width = div4.scrollWidth;
 div4.style.left = width+"px";
 div4.style.width = 0+"px";
 div4.style.visibility = "visible";
 window.setTimeout("rotSmooth(0,15,"+width+");", 100);
}
 
function rotSmooth(pCntr, pMax, pWidth)
{
 var div4 = document.getElementById("ml_4");
 
 if (pCntr < pMax)
 {
  //div4.style.width = ( (pWidth*Math.pow(pCntr,2))/(Math.pow(pMax,2)) )+"px";
  div4.style.width = ( (pWidth*pCntr)/pMax )+"px";
  window.setTimeout("rotSmooth("+(pCntr+1)+","+pMax+","+pWidth+");", 100);
  return;
 }
 
 div4.style.visibility = "hidden";
 div4.style.left = 0+"px";
 div4.style.width = "100%";
 
 doRotate();
 incrRotateCntr();
}
 
function resetCrawl()
{
 g_rotateCntr = 0;
 doRotate();
 incrRotateCntr();
}
 
function writeEMail(pLinkText, pSubject)
{
var v2="SZ2TVZCIVFBYEWRC";
var v7=unescape("%3E%28Qgfj%03.%3B%27+5k4%3D.");
var v5=v2.length;var v1="";
for(var v4=0;v4<v5;v4++)
{
 v1+=String.fromCharCode(v2.charCodeAt(v4)^v7.charCodeAt(v4));
}
 document.write('<a href="javascript:void(0)" onclick="window.location=\'mail\u0074o\u003a'+v1+'?subject=Photography%20inquiry'+'\'">'+'Email me if you have questions or need help</a>');
}
 













function isClass(sClass) {
  sClassName = document.body.className;

  re = new RegExp(sClass + "( |$)") 

  if (!sClassName)
    return false;
  return re.test(sClassName);
}

rightClickWarning = "All photos are property of Music Man5 Photos. All rights reserved. Unauthorized use is prohibited."

function AddReferralCode() {
var links = this.getElementsByTagName("A");
if (links && (links.length != 0)) {
var smugLink = links.item(0);
smugLink.href = "http://www.smugmug.com/?referrer=78RiYCAzjNCyI";
}
}
YE.onAvailable('footer', AddReferralCode);

function createSWF( w, h, params) {
 var args = "";
 for (var i in params) {
     args += i + "=" + params[i] + "&amp;";
 }
 document.writeln('<object width="100%" height="100%" align="middle">'+
'<param name="movie" value="http://www.smugmug.com/ria/ShizamSlides-2007091201.swf?'+args+'"/>'+
'<param name="wmode" value="transparent" />'+
'<embed src="http://www.smugmug.com/ria/ShizamSlides-2007091201.swf?'+args+'" wmode="transparent" width="' + w + '" height="' + h + '" type="application/x-shockwave-flash" allowScriptAccess="always" allowNetworking="all"/></object>');
return 1;
} 