function revin(){
	window.event.srcElement.style.filter = 'alpha(opacity=50)';
	}
function revout(){
	window.event.srcElement.style.filter = 'alpha(opacity=100)';
	}
function makesure(form,text){
   var wantDelete = confirm(text);
   if (wantDelete ) form.submit ();
}
function switch_layer(div,text,butt) {
	if(document.getElementById(div).style.zIndex ==0) {
		document.getElementById(div).style.zIndex =1;
		document.getElementById(text).style.zIndex =0;
		document.getElementById(butt).innerHTML="view code";
		}
	else {
		document.getElementById(div).style.zIndex =0;
		document.getElementById(text).style.zIndex =1;
		document.getElementById(butt).innerHTML="Preview";
		}
}
function popupBox(id,str){
	if(str) {
		document.getElementById(id).className ="popupBox";
		document.getElementById(id).innerHTML = str;
		}
	else {
		document.getElementById(id).className ="popupBoxClose";
		document.getElementById(id).innerHTML = "";
		}
	}
function td_down(div){
	document.getElementById(div).style.borderTopColor = "#000000";
	document.getElementById(div).style.borderBottomColor = "#000099";
	document.getElementById(div).style.borderLeftColor = "#000088";
	document.getElementById(div).style.borderRightColor = "#000011";
}
function td_up(div){
	document.getElementById(div).style.borderTopColor = "#000099";
	document.getElementById(div).style.borderBottomColor = "#000000";
	document.getElementById(div).style.borderLeftColor = "#000011";
	document.getElementById(div).style.borderRightColor = "#000088";
}
function visible_div(div){	document.getElementById(div).style.zIndex =1
	document.getElementById(div).style.visibility = "visible";
}
function hidden_div(div){	document.getElementById(div).style.zIndex =-10
	document.getElementById(div).style.visibility = "hidden";
}
function view_switch(id) {
var e = document.getElementById(id);
if(e.style.display == 'none')
e.style.display = 'block';
else
e.style.display = 'none';
}
function bookmark(bookmarkurl,bookmarktitle){
	if (document.all) window.external.AddFavorite(bookmarkurl,bookmarktitle);
}
function keywords_search(key){	search.q.value = key;
	search.submit();
	}
function PrintDiv(div_id)
    {
        var DocumentContainer = document.getElementById(div_id);
        var WindowObject = window.open('', "PrintDiv",
                              "width=740,height=600,top=200,left=250,toolbars=no,scrollbars=yes,status=no,resizable=no");
        WindowObject.document.writeln(DocumentContainer.innerHTML);
        WindowObject.document.close();
        WindowObject.focus();
        WindowObject.print();
        WindowObject.close();
    }