function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function safemail(name, domain, display) {
displayed=(typeof(display)=="undefined") ? name+"@"+domain : display
document.write('<a href=mailto:' + name + '@' + domain + '>' + displayed + '</a>');
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function JustSoPicWindow(imageName,imageWidth,imageHeight,alt,bgcolor,hugger,hugMargin) {
// by E Michael Brandt of ValleyWebDesigns.com - Please leave these comments intact.
// version 3.0.4  

	if (bgcolor=="") {
		bgcolor="#FFFFFF";
	}
	var adj=10
	var w = screen.width;
	var h = screen.height;
	var byFactor=1;

	if(w<740){
	  var lift=0.90;
	}
	if(w>=740 & w<835){
	  var lift=0.91;
	}
	if(w>=835){
	  var lift=0.93;
	}
	if (imageWidth>w){	
	  byFactor = w / imageWidth;			
	  imageWidth = w;
	  imageHeight = imageHeight * byFactor;
	}
	if (imageHeight>h-adj){
	  byFactor = h / imageHeight;
	  imageWidth = (imageWidth * byFactor);
	  imageHeight = h; 
	}
	   
	var scrWidth = w-adj;
	var scrHeight = (h*lift)-adj;

	if (imageHeight>scrHeight){
  	  imageHeight=imageHeight*lift;
	  imageWidth=imageWidth*lift;
	}

	var posLeft=0;
	var posTop=0;

	if (hugger == "hug image"){
	  if (hugMargin == ""){
	    hugMargin = 0;
	  }
	  var scrHeightTemp = imageHeight - 0 + 2*hugMargin;
	  if (scrHeightTemp < scrHeight) {
		scrHeight = scrHeightTemp;
	  } 
	  var scrWidthTemp = imageWidth - 0 + 2*hugMargin;
	  if (scrWidthTemp < scrWidth) {
		scrWidth = scrWidthTemp;
	  }
	  
	  if (scrHeight<100){scrHeight=100;}
	  if (scrWidth<100){scrWidth=100;}

	  posTop =  ((h-(scrHeight/lift)-adj)/2);
	  posLeft = ((w-(scrWidth)-adj)/2);
 	}

	if (imageHeight > (h*lift)-adj || imageWidth > w-adj){
		imageHeight=imageHeight-adj;
		imageWidth=imageWidth-adj;
	}
	posTop = parseInt(posTop);
	posLeft = parseInt(posLeft);		
	scrWidth = parseInt(scrWidth); 
	scrHeight = parseInt(scrHeight);
	
	var agt=navigator.userAgent.toLowerCase();
	if (agt.indexOf("opera") != -1){
	  var args= new Array();
	  args[0]='parent';
	  args[1]=imageName;
	  var i ; document.MM_returnValue = false;
	  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
	} else {
	newWindow = window.open("vwd_justso.htm","newWindow","width="+scrWidth+",height="+scrHeight+",left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor='+bgcolor+' onBlur="self.close()" onClick="self.close()">');  
	newWindow.document.write('<table width='+imageWidth+' border="0" cellspacing="0" cellpadding="0" align="center" height='+scrHeight+' ><tr><td>');
	newWindow.document.write('<img src="'+imageName+'" width='+imageWidth+' height='+imageHeight+' alt="Click screen to close" >'); 
	newWindow.document.write('</td></tr></table></body></html>');
	newWindow.document.close();
	newWindow.focus();
	}
}

// jspw3x.js version 1.4.9===1.0.0
var gJspw3Obj="",gJspw3nm=0;function massage(wi,hi,g,t,l,n,v,b,clo){wi-=0;if(t != '')t-=0;if(l != '')l-=0;if(!window.isOther){var isOther=(navigator.userAgent.toLowerCase().indexOf("firebird")!=-1)?'fb':'';if(!isOther && (navigator.appName.toLowerCase()=='netscape')&&(parseInt(navigator.appVersion)==4))isOther='n4';window.isOther=isOther;}else var isOther=window.isOther;if(isOther != 'n4' && screen.availHeight){var h=screen.availHeight-30-7;if(isOther=='fb')h-=22;var w=screen.availWidth-10;}else{var adj=10;var h=screen.height;var w=screen.width;if(w<740)h=0.90*h-adj;if(w>=740 & w<835)h=0.91*h-adj;if(w>=835)h=0.93*h-adj;w-=adj;}if(Math.abs(l)>w-100)l=(l/Math.abs(l))*(w-100);if(Math.abs(l)<1&&Math.abs(l)>0.001)l=l*w;if(Math.abs(t)>h-100)t=(t/Math.abs(t))*(h-100);if(Math.abs(t)<1&&Math.abs(t)>0.001)t=t*h;if(n&&v.length>2){n=(n=='js')?0:1;v=v.split('.')[0]*(v.split('.')[1]-0+n);if(v>0)v+=15;}else v=0;var cnh=(hi-0)+v+(clo-0);if(!b){var rw=1,rh=1;if(wi>w)rw=w/wi;if(cnh>h)rh=h/cnh;wi=wi*Math.min(rh,rw);cnh=cnh*Math.min(rh,rw);var rh=1,rw=1;if(cnh>h-Math.abs(t))rh=(h-Math.abs(t))/cnh;if(wi>w-Math.abs(l))rw=(w-Math.abs(l))/wi;cnh=cnh*Math.min(rh,rw);wi=wi*Math.min(rh,rw);}var wh=Math.max(Math.min((cnh-0+2*g),(h-Math.abs(t))),100);var ww=Math.max(Math.min((wi-0+2*g),(w-Math.abs(l))),100);var pt=(h-wh)/2;var pl=(w-ww)/2;if(t!=''){if(t>=0){pt=t;}else pt=h+t-wh;}if(l!=''){if(l>=0){pl=l;}else pl=w+l-ww;}	if(pt<0)pt=0;if(pt>h-wh)pt=h-wh;if(pl<0)pl=0;if(pl>w-ww)pl=w-ww;return [parseInt(ww),parseInt(wh),parseInt(pt),parseInt(pl),parseInt(wi),parseInt(cnh-v-(clo-0))]}

function jspw3(d,m,f){ //v1.4 
	f=f.split(',');var b=f[15],u=f[17],c=f[0],sl="_v_w_d_";var hr="jspw3_pop.htm?"+eval('escape(m.replace(/\\//g,sl))');var ret=massage(f[10],f[11],f[12],f[13],f[14],f[1],String(f[2]),b,f[6]);if(ret!=''){hr+=","+ret[0]+","+c+","+escape(f[1])+","+f[2]+","+escape(f[3])+","+escape(f[4])+","+f[6]+","+f[7]+","+f[8]+","+f[9]+","+ret[4]+","+ret[5]+","+f[16]+","+f[19]+","+eval('d.replace(/\\//g,sl)')+","+escape(f[5]);b=(b)?"yes":"no";var features="resizable=yes,scrollbars="+b+",width="+ret[0]+",height="+ret[1]+",top="+ret[2]+",left="+ret[3];if(u&&!c){window.open(hr,gJspw3nm++,features);}else{if(gJspw3Obj && typeof gJspw3Obj=='object' && !gJspw3Obj.closed)gJspw3Obj.close();gJspw3Obj=window.open(hr,gJspw3nm++,features);}}else window.open(m);document.MM_returnValue=(f[18]==3);}


// Tabs for Design Notes

           jQuery(document).ready(function(){
 //if this is not the first tab, hide it
 jQuery(".tab:not(:last)").hide();

 //to fix u know who
 jQuery(".tab:last").show();

 //when we click one of the tabs
 jQuery(".htabs a").click(function(){
 //get the ID of the element we need to show
 stringref = jQuery(this).attr("href").split('#')[1];
 //hide the tabs that doesn't match the ID
 jQuery('.tab:not(#'+stringref+')').hide();
 //fix
 if (jQuery.browser.msie && jQuery.browser.version.substr(0,3) == "6.0") {
 jQuery('.tab#' + stringref).show();
 }
 else 
 //display our tab fading it in
 jQuery('.tab#' + stringref).fadeIn();
 //stay with me
 return false;
 });
	 
	  });
