function pageWidth() {
return window.innerWidth != null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null;
}


function header() {
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0" style="height:221px; background-repeat:no-repeat;"><tr><td width="100%">');

document.write('<div style="position:absolute; left:0px; top:0px; z-index:1;"><img src="bg-4.jpg" width="937" height="221" alt="backgound header" /></div>');

document.write('<div style="position:absolute; left:0px; top:222px; z-index:1;"><img src="bg-4-2.jpg" width="937" height="128" alt="backgound header reflection" /></div>');

document.write('<div style="position:absolute; left:0px; top:30px; z-index:2;"><a href="http://www.frontlinearts.com"><img src="fa-logo3.gif" class="banner-image-prop" alt="Frontline Arts Web Design, San Francisco - Home" /></a></div>');
document.write('</td><td align="center" style="vertical-align: middle">');
document.write('<div style="position:absolute; left:847px; top:50px; z-index:1;"><img src="light-ani.gif" width="26" height="29" alt="light animation" /></div>');
document.write('<div style="position:absolute; left:851px; top:258px; z-index:1;"><img src="light2-ani.gif" width="26" height="29" alt="light animation - reflection" /></div>');
if (screen.width>=1280) {
document.write('<div style="position:absolute; left:'+((((screen.width-900)/2)+900)-131)+'px; top:0px; z-index:1;"><img src="alcatraz1.jpg" width="263" height="350" alt="alcatraz" /></div>');
}
document.write('</td>');
document.write('</tr></table>');
}

function didyouknow() {
var r_text = new Array ();
r_text[0] = "Designing a website without <i>organic</i> search engine optimization (SEO) in mind may lead to lost revenue and added costs...";
r_text[1] = "A webpage with a lot of links and graphics may look impressive, but if your visitors cannot quickly find what they are looking for, they may simply go somewhere else...";
r_text[2] = "When choosing fonts for your site, it is better to use sans-serif for general text and sarif fonts for headlines only...";
r_text[3] = "Your text should be tailored to meet the reading skill, interest, and patience of your expected average visitor...";
r_text[4] = "Websites are viewed with many different browsers. What looks good in the browser you use, may look off in a competing browser...";
r_text[5] = "Pop-ups are almost always annoying, especially when they occur automatically upon entering a webpage...";
r_text[6] = "To project a professional image, your web page design and layout should be consistent throughout the site...";
r_text[7] = "Background music  or videos that automatically start playing when a web page is loaded may not be appreciated by a large number of visitors...";
r_text[8] = "Worldwide, there are five search engines that make up over 99% of all searches of the web. These five are Google, Yahoo, Bing, Baidu, and Ask...";
r_text[9] = "Leaving plenty of white space on each web page gives your site a sense of neatness and spaciousness...";
var i = Math.floor(10*Math.random());
var tipnum = i+1;

document.write('<br /><br /><div>');
document.write('<table style="height:246px; vertical-align:top; width:188px; text-align:center; margin-left:auto; margin-right:auto; background-repeat: no-repeat;" border="0" cellspacing="0" cellpadding="0" background="didyouknow.gif"><tr>');
document.write('<td style="width:10px;">&nbsp;</td>');
document.write('<td style="height:215px; width:226px; vertical-align:top;">');
document.write('<div style="font-size:9pt"><br /><br /><br /><br /></div>');
document.write('<div class="dyk-text">'+r_text[i]+'</div>');
document.write('<div style="font-size:4pt"><br /></div>');
document.write('<a href="webdesigntips.html#dt'+tipnum+'"><div class="dyk3-text">(Read More)</div></a>');
document.write('</td>');
document.write('<td style="width:10px;">&nbsp;</td>');
document.write('</tr><tr>');
document.write('<td style="width:10px;">&nbsp;</td>');
document.write('<td>');
document.write('<div class="dyk2-text">Web Design Tip #'+tipnum+'<br /></div>');
document.write('</td>');
document.write('<td style="width:10px;">&nbsp;</td>');
document.write('</tr></table>');
document.write('</div>');
}

function footer() {
document.write('<div style="position:absolute; bottom:opx; right:0px; text-align:right; vertical-align:bottom;">');
document.write('<a href="http://validator.w3.org/check?uri=referer"><img src="valid-xhtml11.gif" style="border:0;" alt="W3C Valid XHTML 1.1 Strict" height="23" width="65" /></a>');
document.write('<a href="http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.frontlinearts.com%2Fmain.css"><img style="border:0;width:65px;height:23px" src="valid-css2.gif" alt="W3C Valid CSS 2.1" /></a>');
document.write('<a href="http://www.section508.info/check_this.cfm?URLtest=http://www.frontlinearts.com&s508=1&CheckURL=0"><img style="border:0;" title="Section 508 tested" alt="Website accessibility rating Section 508 approved by section508.info" src="section508-tested.gif" width="63" height="23"/></a>');
document.write('</div>');
}

function emaildecoder() {
var add1=104+1;
var estring='&#'+add1+String.fromCharCode(59);
add1=109+1;
var estring=estring+'&#'+add1+String.fromCharCode(59);
add1=101+1;
var estring=estring+'&#'+add1+String.fromCharCode(59);
add1=110+1;
var estring=estring+'&#'+add1+String.fromCharCode(59);
add1=63+1;
var estring=estring+'&#'+add1+String.fromCharCode(59);
return estring;
}

function emaillink() {
var1='<a href="mailto'+String.fromCharCode(58)+emaildecoder()+'frontlinearts.com">'+emaildecoder()+'frontlinearts.com</a>';
return var1;
}

function ownername() {
var add1=74+1;
var estring='&#'+add1+String.fromCharCode(59);
add1=100+1;
var estring=estring+'&#'+add1+String.fromCharCode(59)+'vin ';
add1=83+1;
var estring=estring+'&#'+add1+String.fromCharCode(59);
add1=100+1;
var estring=estring+'&#'+add1+String.fromCharCode(59)+'rhune';
return estring;
}

function ownername2() {
var add1=74+1;
var estring='&#'+add1+String.fromCharCode(59);
add1=96+1;
var estring=estring+'&#'+add1+String.fromCharCode(59)+'mi ';
add1=70+1;
var estring=estring+'&#'+add1+String.fromCharCode(59);
add1=113+1;
var estring=estring+'&#'+add1+String.fromCharCode(59)+'iffiths';
return estring;
}

function changez(pnum,pnum2,paddress) {
if (document.getElementById('port'+pnum).style.zIndex==2) {
  //window.location=paddress;
  MakeVis(pnum,paddress);
}
else {
document.getElementById('port'+pnum).style.zIndex=2;
document.getElementById('port'+pnum2).style.zIndex=1;
document.getElementById('port'+pnum).style.opacity=1.0;
document.getElementById('port'+pnum2).style.opacity=0.5;
document.getElementById('port'+pnum).style.filter='alpha(opacity=100)';
document.getElementById('port'+pnum2).style.filter='alpha(opacity=50)';
zoomVis(pnum);
}
}

function posTop() {
return typeof window.pageYOffset != 'undefined' ?  window.pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ? document.body.scrollTop : 0;
} 

function MakeVis(pnum,paddress) {

  HideVis();
  document.getElementById('popupbkgd1').style.display='block';
  document.getElementById('exitmark').style.display='block';
  document.getElementById('popupbkgd1').style.top=posTop()+((document.body.offsetHeight/2)-188)+'px';
  document.getElementById('popupbkgd1').style.left=((document.body.offsetWidth/2)-250)+'px';
  document.getElementById('exitmark').style.top=posTop()+(((document.body.offsetHeight/2)-188)+15)+'px';
  document.getElementById('exitmark').style.left=(((document.body.offsetWidth/2)-250)+456)+'px';
  document.getElementById('popup-pic-'+pnum).style.display='block';
  document.getElementById('popup-pic-'+pnum).style.top=posTop()+(((document.body.offsetHeight/2)-188)+50)+'px';
  document.getElementById('popup-pic-'+pnum).style.left=(((document.body.offsetWidth/2)-250)+40)+'px';
}


function HideVis() {

  document.getElementById('popupbkgd1').style.display='none';
  document.getElementById('exitmark').style.display='none';
  var i=1;
  while (i<17) {
   document.getElementById('popup-pic-'+i).style.display='none';
  i++;
  }
}

function zoomVis(pnum) {

var checkid=document.getElementById('port'+pnum).style.zIndex;

if (checkid==2) {
  document.getElementById('zoom'+pnum).style.display='block';
}

}

function HidezoomVis(pnum) {

   document.getElementById('zoom'+pnum).style.display='none';
}

function loadportimgs() {
 if (document.images) {
   preload_image_object = new Image();
   image_url = new Array();
   image_url[1] = "fa-images/portfolio1.jpg";
   image_url[2] = "fa-images/portfolio1-2.jpg";
   image_url[3] = "fa-images/portfolio2.jpg";
   image_url[4] = "fa-images/portfolio2-2.jpg";
   image_url[5] = "fa-images/portfolio3.jpg";
   image_url[6] = "fa-images/portfolio3-2.jpg";
   image_url[7] = "fa-images/portfolio4.jpg";
   image_url[8] = "fa-images/portfolio4-2.jpg";
   image_url[9] = "fa-images/portfolio5.jpg";
   image_url[10] = "fa-images/portfolio5-2.jpg";
   image_url[11] = "fa-images/portfolio6.jpg";
   image_url[12] = "fa-images/portfolio6-2.jpg";
   image_url[13] = "fa-images/portfolio7.jpg";
   image_url[14] = "fa-images/portfolio7-2.jpg";
   image_url[15] = "fa-images/portfolio8.jpg";
   image_url[16] = "fa-images/portfolio8-2.jpg";
   var i = 1;
   var i2 = 1;
   for(i=1; i<17; i++) {
     preload_image_object.src = image_url[i];
     document.getElementById('port'+i).style.display='block';
     if (i2<2) {
       i2++;
     }
     else {
       document.getElementById('loader'+(i/2)).style.display='none';
       i2=1;
     }
       
   }
  }
}
