<!--
function preloadImages() {
	document.preload = new Array();
	if (document.images) {
		for (var i = 0; i < preloadImages.arguments.length; i++) {
			document.preload[i] = new Image();
			document.preload[i].src = preloadImages.arguments[i];
		}
	}
}

function popMenu(sec, action){
	switch (action){
	case "visible":{
		//sec.style.visibility="visible";
		break;
	}
	case "hidden":{
		//sec.style.visibility="hidden";
		break;
	}
	}
}
function docForm(docid){
	document.procForm.docid.value = docid;
	document.procForm.secid.value = 0;
	document.procForm.subid.value = 0;
	document.procForm.submit();
}
function secForm(secid, sub, docs, page){
	document.procForm.docid.value = 0;
	document.procForm.secid.value = secid;
	document.procForm.subid.value = 0;
	document.procForm.docs.value = docs;
	document.procForm.page.value = page;
	if (sub > 0)
		document.procForm.subid.value = sub;
	document.procForm.submit();
}
function imgCatForm(sid, ssid, cid){
	document.procForm.docid.value = 0;
	document.procForm.subid.value = ssid;
	document.procForm.secid.value = sid;
	document.procForm.catimgid.value = cid;
	document.procForm.submit();
}
function calCatForm(sid, ssid, mm, yy){
	document.procForm.docid.value = 0;
	document.procForm.subid.value = ssid;
	document.procForm.secid.value = sid;
	document.procForm.year.value = yy;
	document.procForm.month.value = mm;
	document.procForm.submit();
}
function srchCatForm(str){
	document.procForm.docid.value = 0;
	document.procForm.subid.value = 0;
	document.procForm.secid.value = 2;
	document.procForm.srch.value = str;
	document.procForm.submit();
}
function formStyle_change(tn){
	tn.style.backgroundColor = 'white';
	tn.style.borderRight = 'gainsboro 1px solid';
	tn.style.borderLeft = 'gainsboro 1px solid';
	tn.style.borderTop = 'gainsboro 1px solid';
	tn.style.borderBottom = 'gainsboro 1px solid';
}
function formStyle_click(tp, col1, col2){
	tp.style.backgroundColor = col1;
	tp.style.borderRight = col2 + ' 1px inset';
	tp.style.borderLeft = col2 + ' 1px inset';
	tp.style.borderTop = col2 + ' 1px inset';
	tp.style.borderBottom = col2 + ' 1px inset';
}
function popWin(lnkurl, winName, winWidth, winHeight){
	open(lnkurl, winName ,"toolbar=no, status=no, menubar=no, scrollbars=no, width=" + winWidth + ", height= " + winHeight + ", resizable=no ")
//	return false;
}
function popWinScroll(lnkurl, winName, winWidth, winHeight){
	open(lnkurl, winName ,"toolbar=no, status=no, menubar=no, scrollbars=yes, width=" + winWidth + ", height= " + winHeight + ", resizable=no ")
//	return false;
}
function topmenu_over(tn, colon){
		tn.style.backgroundColor=colon; 
		tn.style.cursor='hand'; 
		//tid.style.border='0 solid #ffffff';
}	
function topmenu_out(tk, coloff){
		tk.style.backgroundColor=coloff; 
		//tid.style.border='0 solid #ffffff';
}
function uplDoc(doc, imid){
	if (imid > 0){
		popWin ("jshp/apps/uploader/miniuploader.asp?docid="+doc+"&himgid="+imid, 'rmenuWin', 450, 350);
	}
	else {
		popWin ("jshp/apps/uploader/miniuploader.asp?docid="+doc, 'rmenuWin', 450, 450);
	}
}
function uplDocRight(doc, imid){
	if (imid > 0){
		popWinScroll ("jshp/apps/uploader/miniuploaderRight.asp?docid="+doc+"&himgid="+imid, 'rmenuWin', 280, 450);
	}
	else {
		popWinScroll ("jshp/apps/uploader/miniuploaderRight.asp?docid="+doc, 'rmenuWin', 280, 450);
	}
}
function uplSec(sec, imid){
	if (imid > 0){
		popWin ("jshp/apps/uploader/miniuploader.asp?secid="+sec+"&himgid="+imid, 'rmenuWin', 400,200);
	}
	else {
		popWin ("jshp/apps/uploader/miniuploader.asp?secid="+sec, 'rmenuWin', 400,200);
	}
}
function uplSubsec(subsec, imid){
	if (imid > 0){
		popWin ("jshp/apps/uploader/miniuploader.asp?subsecid="+subsec+"&himgid="+imid, 'rmenuWin', 400,200);
	}
	else {
		popWin ("jshp/apps/uploader/miniuploader.asp?subsecid="+subsec, 'rmenuWin', 400,200);
	}
}
function showPollRes(){
	hideAllPoll();
	pollResDiv.style.visibility = "visible";
}
function showPoll(){
	hideAllPoll();
	pollDiv.style.visibility = "visible";
}
function showNoPoll(){
	hideAllPoll();
	noPoll.style.visibility = "visible";
}
function showOtherPoll(){
	hideAllPoll();
	otherPollDiv.style.visibility = "visible";
}
function hideAllPoll(){
	divs = document.all.tags("div");
	for (i=0; i<divs.length; i++)	
		divs[i].style.visibility = "hidden";
}
function pollSubmit(){
	for (i=0; i<pollForm.elements.length-2; i++){
		if (pollForm.elements[i].checked){
			document.pollProc.answer.value = pollForm.elements[i].value;
			break;
		}
	}
	document.pollProc.submit();
}
function selectPollDiv(qvalue){
//	document.write(qvalue);
	hideAllPoll();
	switch (qvalue){
	case "show":{
		showPollRes();
		break;
	}
	case "no":{
		showNoPoll();
		break;
	}
	default:{
		showPoll();
		break;
	}
	}
}
function selectPoll(){
	for (i=0; i<pollSelForm.elements.length-2; i++){
		if (pollSelForm.elements[i].checked){
			pollSelProc.pollid.value = pollSelForm.elements[i].value;
			break;
		}
	}
	document.pollSelProc.submit();
}
function commentsSubmit(){
	document.commentsForm.cname.value = commentsPreForm.cname.value;
	document.commentsForm.cemail.value = commentsPreForm.cemail.value;
	document.commentsForm.cbody.value = commentsPreForm.cbody.value;
	document.commentsForm.docid.value = commentsPreForm.docid.value;
	document.commentsForm.uname.value = commentsPreForm.uname.value;
	document.commentsForm.submit();
}

function adjustImage(imgSrc){
	var img;
	var intImageWidth;

	img = new Image();
	img.src = imgSrc;
	if (img.width > 200)
		intImageWidth = 200;
	else
		intImageWidth = img.width;
	document.write ("<img src='" + img.src + "' border=0 width=" + intImageWidth + "  align=left>");
	//alert("<img src=" + img.src + " border=0 width=" + intImageWidth + "  align=left>");

}
function resizeImage(imgID){
	intImgWidth = imgID.width;
	if (intImgWidth>200)
	{
		imgID.width=200;
	}

}
function resizeImages(){
	img = new Array();
	imgID = new Array();
	if (document.images) {
		for (var i = 0; i < resizeImages.arguments.length-1; i++) {
			img[i] = new Image();
			img[i].src = resizeImages.arguments[i];
			imgID[i] = resizeImages.arguments[i+1];
			//alert("img" + i + ", width=" + img[i].width);
			if (imgID[i].width>200)
			{
				imgID[i].width=200;
			}
		}
	}
}



-->