nn4 = (document.layers)? true : false;
ie4 = (document.all)? true : false;
nn6 = (document.getElementById && !ie4)? true : false;


function hl(id) {
	document.all['i'+id].src='img/p6.gif';
}

function uhl(id) {
	document.all['i'+id].src='img/pt.gif';
}

function hll(id) {
	document.all['i'+id].src='img/p7a.gif';
}

function uhll(id) {
	document.all['i'+id].src='img/p7.gif';
}

function gop(obj) {
	if (obj.options[obj.selectedIndex].value>0)
		document.location = 'index.php3?id='+obj.options[obj.selectedIndex].value;
}

function cc(obj) {
	var id = obj.options[obj.selectedIndex].value;
	var s='';
	
//	alert(id);
	if (id>0)
		arr = eval('cs_'+id);
	else
		arr = cs;
	ce = document.all.countId;
	while (ce.options.length>1)
		ce.options[1]=null;
//	alert(arr.length);
	for (var i=0;i<arr.length;i++) {
		if (arr[i]) {
			s = s + '-'+arr[i];
			ce.options[ce.options.length]= new Option (arr[i], i);
		}
	}
//	alert(s);
	
		//ce.options[ce.options.length]=arr[i];
	//	document.location = 'index.php3?id='+obj.options[obj.selectedIndex].value;
}

function sb(id, winH) {
	offW=20;
	offH=20;
	winW = 800;
	winH = winH+90;
		if(screen.width<(winW+offW)){
			xW=screen.width-offW;
			winH=xW*winH/winW;
			winW=xW;
		}
		if(screen.height<(winH+offH)){
			xH=screen.height-offH;
			winW=xH*winW/winH;
			winH=xH;
		}
		var W=offW+winW
		H=offH+winH
		
		if (nn4 || ie4 || nn6) {
		posX = Math.round((screen.width - winW) / 2);
		posY = Math.round((screen.height - winH) / 2);
		posCode = (nn4 || nn6)? 'screenX='+posX+',screenY='+posY : 'left='+posX+',top='+posY;
		} else { posCode = ''; }
		cardWindow = window.open('pic.php?id='+id,'_blank','menubar=no,toolbar=no,scrollbars=no,status=no,width='+W+',height='+H+','+posCode);
}