
//Background-Image
/*window.onload=function(){  
   var thediv=document.getElementById("bgbackground");  
   var imgarray = new Array("bg1.JPG", "bg2.JPG", "bg3.JPG");  
   var spot =Math.floor(Math.random()* imgarray.length);  
   document.body.style.background="url(images/"+imgarray[spot]+")";  
   document.body.style.background-attachment = "fixed";
   document.body.style.background-position = "center";
   document.body.style.background-repeat = "no-repeat";
}  
*/

///Font-increase

var min=8;
var max=18;
function increaseFontSize() {
   var p = document.getElementsByTagName('span');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s += 1;
      }
      p[i].style.fontSize = s+"px"
   }
}
function decreaseFontSize() {
   var p = document.getElementsByTagName('span');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
   }   
}

function increaseFontSizeP() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s += 1;
      }
      p[i].style.fontSize = s+"px"
   }
}
function decreaseFontSizeP() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
   }   
}

//hide/show div

function showContent(vThis,imgid)
{
vParent = vThis.parentNode;
vSibling = vParent.nextSibling;
while (vSibling.nodeType==3) { // Fix for Mozilla/FireFox Empty Space becomes a TextNode or Something
	vSibling = vSibling.nextSibling;
};
	if(vSibling.style.display == "none")
	{
		if(imgid == "image1")
		{
			document.getElementById("image1").src="images/collapse.gif";
		}
		else if(imgid == "image2")
		{
			document.getElementById("image2").src="images/collapse.gif";
		}
		else if(imgid == "image3")
		{
			document.getElementById("image3").src="images/collapse.gif";
		}
		
		vSibling.style.display = "block";
	} else {
		vSibling.style.display = "none";
		
		if(imgid == "image1")
		{
			document.getElementById("image1").src="images/expand.gif";
		}
		else if(imgid == "image2")
		{
			document.getElementById("image2").src="images/expand.gif";
		}
		else if(imgid == "image3")
		{
			document.getElementById("image3").src="images/expand.gif";
		}
		
	
	}
return;
}


function wopen(url, name, w, h,scroll)
{
  
 
  wleft = (screen.width - w) / 2;
  wtop = (screen.height - h) / 2;
  
  if (wleft < 0) {
    w = screen.width;
    wleft = 0;
  }
  if (wtop < 0) {
    h = screen.height;
    wtop = 0;
  }
  var win = window.open(url,
    name,
    'width=' + w + ', height=' + h + ', ' +
    'left=' + wleft + ', top=' + wtop + ', ' +
    ' menubar=no, ' +
    'status=yes, toolbar=no,addressbar=0, location=0, scrollbars=yes, resizable=yes');
  
  win.resizeTo(w, h);
  
  win.moveTo(wleft, wtop);
  win.focus();
}

