/******** Date ***********/

/******** Banner Rotate ***********/

function banner(imgSource,url,alt,chance) {
this.imgSource = imgSource;
this.url = url;
this.alt = alt;
this.chance = chance;
}
function dispBanner() {
with (this) document.write("<A HREF=" + url + "><IMG SRC='" + imgSource + "' WIDTH=203 HEIGHT=38 BORDER=0 ALT='" + alt + "'></A>");
}
banner.prototype.dispBanner = dispBanner;
banners = new Array();
banners[0] = new banner("http://www.shadowmountainpress.com/images/banner_flag.jpg",
                        "",
                        "",
                        20);
banners[1] = new banner("http://www.shadowmountainpress.com/images/banner_press.jpg",
                        "",
                        "",
                        20);
banners[2] = new banner("http://www.shadowmountainpress.com/images/banner_skers.jpg",
                        "",
                        "",
                        20);
banners[3] = new banner("http://www.shadowmountainpress.com/images/banner_mtns.jpg",
                        "",
                        "",
                        20);
banners[4] = new banner("http://www.shadowmountainpress.com/images/banner_brdrm.jpg",
                        "",
                        "",
                        20);
sum_of_all_chances = 0;
for (i = 0; i < banners.length; i++) {
sum_of_all_chances += banners[i].chance;
}
function randomBanner() {
chance_limit = 0;
randomly_selected_chance = Math.round((sum_of_all_chances - 1) * Math.random()) + 1;
for (i = 0; i < banners.length; i++) {
chance_limit += banners[i].chance;
if (randomly_selected_chance <= chance_limit) {
document.write("<A HREF=" + banners[i].url + "><IMG SRC='" + banners[i].imgSource + "' WIDTH=203 HEIGHT=38 BORDER=0 ALT='" + banners[i].alt + "'></A>");
return banners[i];
break;
      }
   }
}

/******** Scroller Set-Up ********/

//scroller width
var swidth=280

//scroller height
var sheight=151


//scroller's speed;
var sspeed=2

var wholemessage=''

//text: change to your own

wholemessage='<div align="center" class="vd_blue_small"><b>Take a look at whats news here at Shadow Mountain Press</b><br>(Tip: mouse over to stop scrolling)</div><p><div align="left"><a href="http://www.cfmc.com" target="_blank"><img src="images/portfolio/logo_small_cfmc.gif" width="120" height="40" border="0" align="left"><b>December 17, 2001</b> - SMP has just completed a total site re-design and integration project for CfMC (Computers for Marketing Corporation), a software development firm based in beautiful San Francisco CA. Click to view this site >>></a></div><p><div align="left"><a href="http://www.why2.org" target="_blank"><img src="images/portfolio/logo_small_why2.gif" width="148" height="48" border="0" align="left"><b>2001-2002</b> - One of SMPs premier web projects, the We Hear You 2 site is a complete web portal for the disabled.  Among the first of its kind, this complete internet portal brings both online and offline accessibility to the disabled community of the world. SMP strives to be a leader in this important cause.  Click to view >>></a></div><p><div align="left"><a href="http://www.shadowmountainpress.com/portfolio/gui/software.html" target="_blank"><img src="images/portfolio/logo_small_gui.gif" width="140" height="49" border="0" align="left"><b>June 6, 2001</b> - Developed for one of the most innovative Fortune 100 technology companies, the Graphic User Interface (GUI) created by SMP provides complete web access to a sophisticated, high-end suite of integrated web servers.  Click to view >>></a></div><p><div align="left"><a href="http://www.shadowmountainpress.com/portfolio/logo/index.html"><img src="images/portfolio/logo_small_xpectrum.gif" width="140" height="48" border="0" align="left"><b>September 1, 2001</b> - Specializing in logo creation, SMP has done all of the add work for Xpectrum Painting, a national paint franchise corporation.  Click to view >>></a></div>'

function start(){
if (document.all) return
if (document.getElementById){
document.getElementById("slider").style.visibility="show"
ns6marquee(document.getElementById('slider'))
}
else if(document.layers){
document.slider1.visibility="show"
ns4marquee(document.slider1.document.slider2)
}
}
function ns4marquee(whichlayer){
ns4layer=eval(whichlayer)
ns4layer.document.write(wholemessage)
ns4layer.document.close()
sizeup=ns4layer.document.height
ns4layer.top-=sizeup
ns4slide()
}
function ns4slide(){
if (ns4layer.top>=sizeup*(-1)){
ns4layer.top-=sspeed
setTimeout("ns4slide()",100)
}
else{
ns4layer.top=sheight
ns4slide()
}
}
function ns6marquee(whichdiv){
ns6div=eval(whichdiv)
ns6div.innerHTML=wholemessage
ns6div.style.top=sheight
sizeup=sheight
ns6slide()
}
function ns6slide(){
if (parseInt(ns6div.style.top)>=sizeup*(-1)){
ns6div.style.top=parseInt(ns6div.style.top)-sspeed
setTimeout("ns6slide()",100)
}
else{
ns6div.style.top=sheight
ns6slide()
}
}

/******** Open Browser Window ********/

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/******** Close Browser Window ********/

function supressError() {
    return true;
}

function load(url) {
    window.onerror = supressError;
    opener.location.href = url;
    setTimeout('self.close()',1000);
}

/******** Swap Image ********/

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) { //v3.0
  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); 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];}
}

/******** Bottom ***********/
