function MM_changeProp(objId,x,theProp,theValue) { //v9.0
  var obj = null; with (document){ if (getElementById)
  obj = getElementById(objId); }
  if (obj){
    if (theValue == true || theValue == false)
      eval("obj.style."+theProp+"="+theValue);
    else eval("obj.style."+theProp+"='"+theValue+"'");
  }
}

function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function randomSizes(objId) { //v9.0
  var theWidth = Math.random()*300+150;
  var theHeight = Math.random()*200+150;
  var obj = null; with (document){ if (getElementById)
  obj = getElementById(objId); }
  if (obj){
      obj.style.width=theWidth+"px";
      obj.style.height=theHeight+"px";
	  obj.style.visibility='visible';
	}
}

function changeSizes() {
	randomSizes('pOne');
	randomSizes('pTwo');
	randomSizes('pThree');
	randomSizes('pFour');
	randomSizes('pFive');
	randomSizes('pSix');
	randomSizes('pSeven');
	randomSizes('pEight');
}

function reduceSize(objId) {
	var obj = null; with (document){ if (getElementById)
  	obj = getElementById(objId); }
  	if (obj){
      obj.style.width="150px";
      obj.style.height="0px";
	  obj.style.visibility='hidden';
	}
}

function toSilence(objId) {
	var obj = null; with (document){ if (getElementById)
  	obj = getElementById(objId); }
  	if (obj){
      obj.style.width="150px";
      obj.style.height="0px";
	  obj.style.visibility='hidden';
	}
}


function silencePlease() {
	toSilence('pOne');
	toSilence('pTwo');
	toSilence('pThree');
	toSilence('pFour');
	toSilence('pFive');
	toSilence('pSix');
	toSilence('pSeven');
	toSilence('pEight');
}

function fixSize(objId) {
	reduceSize('pOne');
	reduceSize('pTwo');
	reduceSize('pThree');
	reduceSize('pFour');
	reduceSize('pFive');
	reduceSize('pSix');
	reduceSize('pSeven');
	reduceSize('pEight');
	var obj = null; with (document){ if (getElementById)
  	obj = getElementById(objId); }
  	if (obj){
      obj.style.width="450px";
      obj.style.height="450px";
	  obj.style.visibility='visible';
	}
}
	
// change CSS randomly
function changeStyleSheet() {
	var theRand = Math.random()*10;
	var theCSS = Math.floor(theRand);
  	var i, a, main;
 	for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == theCSS) a.disabled = false;
    }
  }
}
changeStyleSheet();
