function openpop(url,popconfig)
{
winLeft=(screen.width-800)/4;
if (url.search(".pdf")!=-1||popconfig=="pdf"){
	pop_pdf=window.open(url.replace(/ /g,"%20"), "pop_pdf", config="scrollbars=yes,resizable=yes,toolbar=no,location=no,left="+winLeft+",top=20,height=550,width=750,status=yes,menubar=yes,");
	pop_pdf.focus();
}else if (popconfig=="htm"){
	pop_htm=window.open(url.replace(/ /g,"%20"), "pop_htm", config="scrollbars=yes,resizable=yes,toolbar=yes,location=yes,left="+winLeft+",top=20,height=550,width=790,status=yes,menubar=yes,");
	pop_htm.focus();
}else if (popconfig=="scrollmap"){
	if (screen.width<1000){w=screen.width-50}else{w=950}
	if (screen.height<740){h=screen.height-80}else{h=680}
	winLeft=(screen.width-w)/2;
	pop_map1=window.open(url, "pop_map1", config="scrollbars=yes,resizable=yes,toolbar=no,location=no,left="+winLeft+",top=20,height="+h+",width="+w+",status=no,menubar=no,");
	pop_map1.focus();
}else if (popconfig=="map"){
	pop_map2=window.open(url, "pop_map2", config="scrollbars=no,resizable=no,toolbar=no,location=no,left="+winLeft+",top=20,height=600,width=800,status=no,menubar=no,");
	pop_map2.focus();
}else{
	pop_custom=window.open(url.replace(/ /g,"%20"), "pop_custom", config=popconfig);
	pop_custom.focus();
}
}

function maxLength(obj,i) 
{if (obj.value.length >= i) {obj.value = obj.value.slice(0,i)}}
