// Design by Faxinad.com
	var new_window;
	var w=390;
	var h=200;
	var l=(screen.width-w)/2
	var t=(screen.height-h)/2
	var www=801;
	var hhh=600;
	var xxx=(screen.width-www)/2;
	var yyy=(screen.height-hhh)/2;
	var delta_x=-10;
	var delta_y=-10;
	var movesz_x=10;
	var movesz_y=10;
	var movesz_w=w;
	var movesz_h=h;
	var x_position=l;
	var y_position=t;
	
	var x0;
	var y0;
	var selectenable=0;

function show(strtype)
{
document.all.item(strtype).style.display = "block";
}
function hide(strtype)
{
document.all.item(strtype).style.display = "none";
}
function showorhide(strtype,strnum)
{
	var f = document.forms["form1"];
	if (f.elements[strnum].checked == false)
	{
	document.all.item(strtype).style.display = "block";
	}else
	{
	document.all.item(strtype).style.display = "none";
	}
}
function checkAll(){
  document.form1.allsel.checked=false;
  var coll=document.forms["form1"].tags("input");
    for (i=0;i<coll.length;i++){
	    if (coll.item(i).name.substr(0,2)=="ck") {
			    coll.item(i).checked=false;
		 }
		}
}

function change(v){
  var f = document.forms["form1"];
  for (i=0;i<f.elements.length;i++)
    if (f.elements[i].name.substr(0,2)=="ck") f.elements[i].checked = v;
}	

	function open_window(){
		new_window=window.open("search.asp","johnson","scrollbars=yes,width="+w+",height="+h+",left="+l+",top="+t)
		new_window.focus()
	}

	function close_window(){
		if(!new_window){
			alert("open the window first!")
		}
		else if (new_window.closed){
			alert("the window is closed!")
		}
		else {
			stop_move()
			new_window.close()
		}
	}

	function stop_move(){
		clearInterval(interval_id)
		this.focus()
		x_position=l;
		y_position=t;
		delta_x=-10;
		delta_y=-10;
		movesz_x=10;
		movesz_y=10;
		movesz_w=w;
		movesz_h=h;
		w=390;
		h=200;
	}

	function removedd(){
		w=801;
		h=601;
		www=390;
		hhh=200;
		l=(screen.width-www)/2
		t=(screen.height-hhh)/2
		this.resizeTo(www,hhh);	
		this.moveTo(l,t);
	}


	function mymove(){
		interval_id=setInterval("move_window()",1);
		this.focus()
	}

	function myremove(){
		interval_id=setInterval("remove_window()",1);
		this.focus()
	}

	function move_window(){
		this.moveBy(delta_x,delta_y)
		
		this.resizeTo(movesz_w,movesz_h);
		movesz_w+=movesz_x;
		movesz_h+=movesz_y;
		x_position+=delta_x;
		y_position+=delta_y;

		if (x_position<=xxx){
			delta_x = 0
		}

		if (y_position<=yyy){
			delta_y = 0
		}

		if (movesz_w>=www){
			movesz_x = 0
		}

		if (movesz_h>=hhh){
			movesz_y = 0
		}
		if (x_position<=xxx&&movesz_w>=www&&movesz_h>=hhh&&y_position<=yyy){
			stop_move();
		}
	}
	
	function remove_window(){
		this.moveBy(delta_x,delta_y)
		
		this.resizeTo(movesz_w,movesz_h);
		movesz_w+=movesz_x;
		movesz_h+=movesz_y;
		x_position+=delta_x;
		y_position+=delta_y;

		if (x_position>=xxx){
			delta_x = 0
		}

		if (y_position>=yyy){
			delta_y = 0
		}

		if (movesz_w<=www){
			movesz_x = 0
		}

		if (movesz_h<=hhh){
			movesz_y = 0
		}
		if (x_position>=xxx&&movesz_w<=www&&movesz_h<=hhh&&y_position>=yyy){
			stop_move();
		}
	}
	
	function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
    }
