
// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
var IE = document.all?true:false



function changeClass(dir){
var fsize = 1;
var postcounter = document.getElementById("rowcounter").value;

fsize = parseFloat(document.getElementById("fsize").value);

fsize = (dir == "up")? fsize + 0.5: fsize - 0.5
//alert(fsize);
if(fsize <= 0.5)
	fsize = 1

if (fsize > 10)
	fsize = 10
	
for (i =0;i <= postcounter;i++) {
	var postname = "post" + i;
document.getElementById(postname).style.fontSize = fsize+"em";
document.getElementById("navholder").style.fontSize = fsize+"em";
}

if (document.getElementById("boxlinks") != null)
	document.getElementById("boxlinks").style.fontSize = fsize+"em";

document.getElementById("fsize").value = fsize;

}

//This Function will increase the size of the font on the page. 
function changeClass_(direction){
var postcounter = document.getElementById("rowcounter").value;

for (i =0;i <= postcounter;i++) {
	var postname = "post" + i;
	//alert(postname);
	var vClassname = document.getElementById(postname).className;
	var vClassnum = vClassname.substr((vClassname.length -1),vClassname.length);
	var vnum =  parseInt(vClassnum);

	if (vnum == 9)
	vnum = 1;

	if (direction == "up")
	vnum = vnum + 1;
	else{
	if (vnum != 1)
	vnum = vnum - 1;
	}


	document.getElementById("post" + i).className = "content"+vnum;
	if (document.getElementById("links") != null)
		document.getElementById("links").className = "links"+vnum;
		
	}
}

function copy_content(evt){//This function will copy the content from the text area, and add in break lines. using HTML. 
//this is needed because the text area does not include break lines when it passes it data back to the post information.
//
//NOTE: Copying and pasting does not work at the moment. I will work on this known issue.
var key = (evt.which) ? evt.which : event.keyCode;

 if (key == 13){ //when enter is pressed we will add a break line into the content. 
document.getElementById("formatted_Content").value += String.fromCharCode(key) + "<br>";
}
else{//we will just add the keypressed into the content. 
document.getElementById("formatted_Content").value += String.fromCharCode(key);
}



}






/* 
  ------------------------------------
  PVII Menu CSS Express Drop-Down Menu
  by Project Seven Development
  www.projectseven.com
  ------------------------------------
*/
function P7_ExpMenu(){ //v1.1.0.2 by PVII-www.projectseven.com
 if(navigator.appVersion.indexOf("MSIE")==-1){return;}
 var i,k,g,lg,r=/\s*p7hvr/,nn='',c,cs='p7hvr',bv='p7menubar';
 
 for(i=0;i<10;i++)
 {g=document.getElementById(bv+nn);
 if(g){
 lg=g.getElementsByTagName("LI");
 if(lg){
	for(k=0;k<lg.length;k++){
		lg[k].onmouseover=function(){
			c=this.className;cl=(c)?c+' '+cs:cs;
			this.className=cl;
		};lg[k].onmouseout=function(){c=this.className;
			this.className=(c)?c.replace(r,''):'';};
	}
 }
 
 }
 nn=i+1;}
}

