//14 by 14

d=document;l=(d.layers)?1:0;op=navigator.userAgent.toLowerCase().indexOf('opera')!=-1; msie=(d.all)?1:0;

function gE(e,f){if(l){f=(f)?f:self;var V=f.document.layers;
if(V[e])return V[e];for(var W=0;W<V.length;)t=gE(e,V[W++]);return t;}if(d.all)return d.all[e];return d.getElementById(e);}

//show element
function sE(e){if(l)e.visibility='show';else e.style.visibility='visible';}

//hide element
function hE(e){if(l)e.visibility='hide';else e.style.visibility='hidden';}

//get left posn
function gX(e){if(l) return e.left;else if(d.all)return e.style.pixelLeft;else return e.style.left}

//get top posn
function gY(e){if(l) return e.top;else if (d.all)return e.style.pixelTop;else return e.style.top}

//get width
function gW(e){if(l) return e.width;else return e.style.width}
//get height
//function gH(e){if(l) return e.clip.height;else if(op) return e.style.pixelHeight;else return e.style.height}
//get dynamic height
function gH(myid)
{ 
divob = gE(myid);
if (divob.offsetHeight) { eheight = divob.offsetHeight }
else if (d.getElementById) {eheight = d.defaultView.getComputedStyle(test, "").getPropertyValue("height")}
return eheight;
}

// baseurl= "http://www.14by14/Issue10/";
baseurl = "file:///C|/Documents and Settings/Peter/Desktop/Documents/14by14_Issue10/Site/";


  function frameBust() 
{
	if (self.parent.frames.length != 0)
	self.parent.location=document.location;
}

// Picture-swapping 

function rollIn(imgName) //e.g. rollIn("umb") and name the initial image umb
{
if (d.layers) return; // not supporting older NS browsers
      document[imgName].src=eval(imgName + "_on.src");
}

function rollOut(imgName)
{
if (d.layers) return;
      document[imgName].src=eval(imgName + "_off.src");
 }


function setStatus(content) {
self.status=content;
}


//open(URL, windowName[, windowFeatures])

function popUpWindow(url) {
window.open (url, 'newWin', 'scrollbars=yes,status=yes,resizable=yes,screenx=0, screeny=0,width=550,height=440')
}


 //sidebar menu: links to all other pages including Contents page and Editorial, then to author names under headings, etc 

function makeMenu(thisheadline) 
{
mstring = "";
mstring += '<h6 style="text-align:center; font-size: 140%; line-height: 1.3em; letter-spacing: 1px"><a href="Sept2009/" title="Issue 10: September 2009">CURRENT ISSUE<br>September 2009 </a></h6></br>';


//
     // 	
//
     // 
	
		if (thisheadline != "About 14 by 14")
		mstring+='<h6><a href="About.html" title="About 14 by 14">About 14 by 14</a></h6>';
		else mstring+= '<h6 class="selected">About 14 by 14</h6>';	//don't link to self
			//	
//
     // 
	
		if (thisheadline != "Submissions&nbsp;")
		mstring+='<h6><a href="Submit.html" title="Submit online or by email">Submissions&nbsp;</a></h6>';
		else mstring+= '<h6 class="selected">Submissions&nbsp;</h6>';	//don't link to self
			//	
//
     // 
	
		if (thisheadline != "Archive")
		mstring+='<h6><a href="Archive.html" title="">Archive</a></h6>';
		else mstring+= '<h6 class="selected">Archive</h6>';	//don't link to self
			//	
//
document.write(mstring);
} //End makeMenu function



function writeEmail(name,domain,linktext) {
   visible=(typeof(linktext)=="undefined")? name+"@"+domain : 
linktext;
   document.write ('<a href=mailto:'+name+'@'+domain+'>'+visible+'</a>');
}

// Display today's date
function todayDate()
{
dw = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ); 
m = new Array( "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");  
today = new Date(); 
day = today.getDate(); //day of the month
//
//thedate = (d[today.getDay()]+" ");
thedate= dw[today.getDay()]+ ", "; //day of the week
thedate += m[today.getMonth()]+" ";
thedate += day + ", ";
theyear = today.getYear();
if (theyear < 1900) theyear += 1900;
thedate += theyear;
return thedate;
}

function getFront(mainStr,searchStr)
{
foundOffset = mainStr.lastIndexOf(searchStr);
if (foundOffset == -1) return null; //not found
return mainStr.substring(0,foundOffset)
}



