﻿//////////// Skin Border (Currently 2,5 are used ///////////
function SkinBorderBegin(SKIN,TITLE,WIDTH,HEIGHT,COLLAPSABLE,ALIGN,ICON,BGCOLOR) {
	switch(SKIN) {
		case 1: // gray border
			document.write(
			"<table width='100%' height=100% border='0' cellpadding='0' cellspacing='0' align='"+ALIGN+"'>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border1_01.gif' width='11' height='34' alt='' class='clsNoPrint'></td>"+
			"		<td style='background-image:url("+request.svcroot+"images/border1_03.gif);background-repeat:repeat-x;padding-top:6px;' height='34' nowrap='nowrap'>"+
			"			"+(ICON!=""?"<img src='"+request.svcroot+"images/"+ICON+"' align='middle'>":"")+
			"			<span class=clsBroadcastFrameTitle>"+TITLE+"</span>"+
			"		</td>"+
			"		<td><img src='"+request.svcroot+"images/border1_05.gif' width='67' height='34' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border1_07.gif);background-repeat:repeat-x' height='34'>"+
			"		</td>"+
			"		<td><img src='"+request.svcroot+"images/border1_09.gif' width='13' height='34' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td style='background-image:url("+request.svcroot+"images/border1_16.gif);background-repeat:repeat-y' width='11'></td>		"+
			"		<td width='100%' bgcolor='#eeeeee' colspan='3' valign='top'><!--- Content --->"
			)
			break
		case 2: // general blue border
			document.write(
			"<table style='width:"+(WIDTH?WIDTH:"")+"' border='0' cellpadding='0' cellspacing='0' align='"+(ALIGN?ALIGN:"")+"'>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border2_01.gif' width='11' height='33' alt='' class='clsNoPrint'></td>"+
			"		<td><img src='"+request.svcroot+"images/border2_02.gif' width='12' height='33' alt='' class='clsNoPrint'></td>"+
			"		<td style='background-image:url("+request.svcroot+"images/border2_04.gif);background-repeat:repeat-x;padding-top:3px' height='33' nowrap='nowrap'>"+
			"			"+(ICON&&ICON!=""?"<img src='"+request.svcroot+"images/"+ICON+"' align='middle'>":"")+
			"			<span class=clsBroadcastFrameTitle2>"+(TITLE?TITLE:"")+"</span>"+
			"			"+(COLLAPSABLE&&COLLAPSABLE==1?"<img src='"+request.svcroot+"images/minus2.gif' align='absbottom' onclick='SkinToggleHide(this)' style='cursor:pointer' width=12 height=12 />&nbsp;":"")+
			"		</td>"+
			"		<td><img src='"+request.svcroot+"images/border2_06.gif' width='110' height='33' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border2_07.gif);background-repeat:repeat-x' height='33'>"+
			"		</td>"+
			"		<td><img src='"+request.svcroot+"images/border2_09.gif' width='12' height='33' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td style='background-image:url("+request.svcroot+"images/border2_14.gif);background-repeat:repeat-y' width='11'></td>"+
			"		<td width='100%' bgcolor='#FFFFFF' colspan='4' valign='top'><!--- Content --->"
			)
			break
		case 3: // general blue box
			document.write(
			"<table style='width:"+WIDTH+"' border='0' cellpadding='0' cellspacing='0' align='"+ALIGN+"'>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border3_01.gif' width='10' height='28' alt='' class='clsNoPrint'></td>"+
			"		<td><img src='"+request.svcroot+"images/border3_02.gif' width='15' height='28' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border3_04.gif);background-repeat:repeat-x;padding-top:2px' height='28' nowrap='nowrap'>"+
			"			"+(COLLAPSABLE==1?"<img src='"+request.svcroot+"images/minus2.gif' align='absbottom' onclick='SkinToggleHide(this)' style='cursor:pointer' width=12 height=12 />&nbsp;":"")+
			"			<span class=clsBroadcastFrameTitle2"+(COLLAPSABLE==1?" style='cursor:pointer' onclick='this.parentElement.firstChild.onclick()'":"")+">"+TITLE+"</span>"+
			"		</td>"+
			"		<td><img src='"+request.svcroot+"images/border3_06.gif' width='13' height='28' alt='' class='clsNoPrint'></td>"+
			"		<td><img src='"+request.svcroot+"images/border3_07.gif' width='9' height='28' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td style='background-image:url("+request.svcroot+"images/border3_14.gif);background-repeat:repeat-y' width='10'></td>"+
			"		<td width='100%' bgcolor='#FFFFFF' colspan='3'><!--- Content --->"
			)
			break
		case 4: // general blue box without header
			document.write(
			"<table style='width:"+WIDTH+"' border='0' cellpadding='0' cellspacing='0' align='"+ALIGN+"'>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border4_01.gif' width='11' height='12' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border4_03.gif);background-repeat:repeat-x;' height='12' nowrap='nowrap'>"+
			"			"+(COLLAPSABLE==1?"<img src='"+request.svcroot+"images/minus2.gif' align='absbottom' onclick='SkinToggleHide(this)' style='cursor:pointer' width=12 height=12 />&nbsp;":"")+
			"		</td>"+
			"		<td><img src='"+request.svcroot+"images/border4_05.gif' width='11' height='12' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td style='background-image:url("+request.svcroot+"images/border4_09.gif);background-repeat:repeat-y' width='11'></td>"+
			"		<td width='100%' bgcolor='#FFFFFF' colspan='1'><!--- Content --->"
			)
			break
		case 5:
			document.write(
			"<table style='width:"+WIDTH+"' border='0' cellpadding='0' cellspacing='0' align='"+ALIGN+"'>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border2red_01.gif' width='11' height='33' alt='' class='clsNoPrint'></td>"+
			"		<td><img src='"+request.svcroot+"images/border2red_02.gif' width='12' height='33' alt='' class='clsNoPrint'></td>"+
			"		<td style='background-image:url("+request.svcroot+"images/border2red_04.gif);background-repeat:repeat-x;padding-top:3px' height='33' nowrap='nowrap'>"+
			"			"+(ICON!=""?"<img src='"+request.svcroot+"images/"+ICON+"' align='middle'>":"")+
			"			<span class=clsBroadcastFrameTitle2>"+TITLE+"</span>"+
			"			"+(COLLAPSABLE==1?"<img src='"+request.svcroot+"images/minus2.gif' align='absbottom' onclick='SkinToggleHide(this)' style='cursor:pointer' width=12 height=12 />&nbsp;":"")+
			"		</td>"+
			"		<td><img src='"+request.svcroot+"images/border2red_06.gif' width='110' height='33' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border2red_07.gif);background-repeat:repeat-x' height='33'>"+
			"		</td>"+
			"		<td><img src='"+request.svcroot+"images/border2red_09.gif' width='12' height='33' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td style='background-image:url("+request.svcroot+"images/border2red_14.gif);background-repeat:repeat-y' width='11'></td>"+
			"		<td width='100%' bgcolor='#FFFFFF' colspan='4' valign='top'><!--- Content --->"
			)
			break
		case 6:
			document.write(
			"<table style='width:"+WIDTH+"' border='0' cellpadding='0' cellspacing='0' align='"+ALIGN+"'>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border2green_01.gif' width='11' height='33' alt='' class='clsNoPrint'></td>"+
			"		<td><img src='"+request.svcroot+"images/border2green_02.gif' width='12' height='33' alt='' class='clsNoPrint'></td>"+
			"		<td style='background-image:url("+request.svcroot+"images/border2green_04.gif);background-repeat:repeat-x;padding-top:3px' height='33' nowrap='nowrap'>"+
			"			"+(ICON!=""?"<img src='"+request.svcroot+"images/"+ICON+"' align='middle'>":"")+
			"			<span class=clsBroadcastFrameTitle3>"+TITLE+"</span>"+
			"			"+(COLLAPSABLE==1?"<img src='"+request.svcroot+"images/minus2.gif' align='absbottom' onclick='SkinToggleHide(this)' style='cursor:pointer' width=12 height=12 />&nbsp;":"")+
			"		</td>"+
			"		<td><img src='"+request.svcroot+"images/border2green_06.gif' width='110' height='33' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border2green_07.gif);background-repeat:repeat-x' height='33'>"+
			"		</td>"+
			"		<td><img src='"+request.svcroot+"images/border2green_09.gif' width='12' height='33' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td style='background-image:url("+request.svcroot+"images/border2green_14.gif);background-repeat:repeat-y' width='11'></td>"+
			"		<td width='100%' bgcolor='#FFFFFF' colspan='4' valign='top'><!--- Content --->"
			)
			break
		case 7:
			document.write(
			"<table style='width:"+WIDTH+"' border='0' cellpadding='0' cellspacing='0' align='"+ALIGN+"'>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border2gray_01.gif' width='11' height='33' alt='' class='clsNoPrint'></td>"+
			"		<td><img src='"+request.svcroot+"images/border2gray_02.gif' width='12' height='33' alt='' class='clsNoPrint'></td>"+
			"		<td style='background-image:url("+request.svcroot+"images/border2gray_04.gif);background-repeat:repeat-x;padding-top:3px' height='33' nowrap='nowrap'>"+
			"			"+(ICON!=""?"<img src='"+request.svcroot+"images/"+ICON+"' align='middle'>":"")+
			"			<span class=clsBroadcastFrameTitle3>"+TITLE+"</span>"+
			"			"+(COLLAPSABLE==1?"<img src='"+request.svcroot+"images/minus2.gif' align='absbottom' onclick='SkinToggleHide(this)' style='cursor:pointer' width=12 height=12 />&nbsp;":"")+
			"		</td>"+
			"		<td><img src='"+request.svcroot+"images/border2gray_06.gif' width='110' height='33' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border2gray_07.gif);background-repeat:repeat-x' height='33'>"+
			"		</td>"+
			"		<td><img src='"+request.svcroot+"images/border2gray_09.gif' width='12' height='33' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td style='background-image:url("+request.svcroot+"images/border2gray_14.gif);background-repeat:repeat-y' width='11'></td>"+
			"		<td width='100%' bgcolor='#FFFFFF' colspan='4' valign='top'><!--- Content --->"
			)
			break
		case 8: // general blue box
			document.write(
			"<table style='width:"+WIDTH+"' border='0' cellpadding='0' cellspacing='0' align='"+ALIGN+"'>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border3red_01.gif' width='10' height='28' alt='' class='clsNoPrint'></td>"+
			"		<td><img src='"+request.svcroot+"images/border3red_02.gif' width='15' height='28' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border3red_04.gif);background-repeat:repeat-x;padding-top:2px' height='28' nowrap='nowrap'>"+
			"			"+(COLLAPSABLE==1?"<img src='"+request.svcroot+"images/minus2.gif' align='absbottom' onclick='SkinToggleHide(this)' style='cursor:pointer' width=12 height=12 />&nbsp;":"")+
			"			<span class=clsBroadcastFrameTitle2"+(COLLAPSABLE==1?" style='cursor:pointer' onclick='this.parentElement.firstChild.onclick()'":"")+">"+TITLE+"</span>"+
			"		</td>"+
			"		<td><img src='"+request.svcroot+"images/border3red_06.gif' width='13' height='28' alt='' class='clsNoPrint'></td>"+
			"		<td><img src='"+request.svcroot+"images/border3red_07.gif' width='9' height='28' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td style='background-image:url("+request.svcroot+"images/border3red_14.gif);background-repeat:repeat-y' width='10'></td>"+
			"		<td width='100%' bgcolor='#FFFFFF' colspan='3'><!--- Content --->"
			)
			break
		case 9: // general gray box without header
			document.write(
			"<table width='"+WIDTH+"' height='"+HEIGHT+"' border='0' cellpadding='0' cellspacing='0' align='"+ALIGN+"'>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border4gray_01.gif' width='11' height='12' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border4gray_03.gif);background-repeat:repeat-x;' height='12' nowrap='nowrap'>"+
			"			"+(COLLAPSABLE==1?"<img src='"+request.svcroot+"images/minus2.gif' align='absbottom' onclick='SkinToggleHide(this)' style='cursor:pointer' width=12 height=12 />&nbsp;":"")+
			"		</td>"+
			"		<td><img src='"+request.svcroot+"images/border4gray_05.gif' width='11' height='12' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td style='background-image:url("+request.svcroot+"images/border4gray_09.gif);background-repeat:repeat-y' width='11'></td>"+
			"		<td width='100%' valign='top' bgcolor='#"+BGCOLOR+"' colspan='1'><!--- Content --->"
			)
			break
		case 10: // button
			document.write(
			"<table cellpadding='0' cellspacing='0' width='"+WIDTH+"' align='"+ALIGN+"'>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/button1_02.gif' height=37 width=36></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/button1_04.gif);background-repeat:repeat-x;height:37px;font-size:15px;font-weight:bold;color:#2e2e2e;text-align:center' nowrap='nowrap'>"+
			"		"+TITLE+"</td><td><img src='"+request.svcroot+"images/button1_06.gif' height=37 width=35></td>"+
			"	</tr>"+
			"</table>"
			)
			break
		case 11: // general yahoo box without header
			document.write(
			"<table width='"+WIDTH+"' height='"+HEIGHT+"' border='0' cellpadding='0' cellspacing='0' align='"+ALIGN+"'>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border5_01.gif' width='5' height='5' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border5_03.gif);background-repeat:repeat-x;' height='5' nowrap='nowrap'>"+
			"		</td>"+
			"		<td><img src='"+request.svcroot+"images/border5_05.gif' width='5' height='5' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td style='background-image:url("+request.svcroot+"images/border5_09.gif);background-repeat:repeat-y' width='5'></td>"+
			"		<td width='100%' height='100%' bgcolor='#f5f5f5' colspan='1' valign=top><!--- Content --->"
			)
			break
		case 12:
			document.write(
			"	<table cellpadding='0' cellspacing='0' bgcolor='#EAEAEA' style='border:1px;border-collapse:collapse;color:darkred;font-weight:bold' width='"+(WIDTH?WIDTH:"")+"' height='"+(HEIGHT?HEIGHT:"")+"'>"+
			"	<tr><td width=5 height=5><img src='"+request.svcroot+"images/box1.gif' width='5' height='5'></td><td style='border-top:1px solid gray'></td><td width=5 height=5><img src='"+request.svcroot+"images/box2.gif' width='5' height='5'></td></tr>"+
			"	<tr><td style='border-left:1px solid gray'></td><td style='padding:2 5 2 5' align='"+(ALIGN?ALIGN:"")+"'>"
			)
			break
		case 13: // general red box without header
			document.write(
			"<table style='width:"+WIDTH+"' border='0' cellpadding='0' cellspacing='0' align='"+ALIGN+"'>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border13_01.gif' width='11' height='12' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border13_03.gif);background-repeat:repeat-x;' height='12' nowrap='nowrap'>"+
			"			"+(COLLAPSABLE==1?"<img src='"+request.svcroot+"images/minus2.gif' align='absbottom' onclick='SkinToggleHide(this)' style='cursor:pointer' width=12 height=12 />&nbsp;":"")+
			"		</td>"+
			"		<td><img src='"+request.svcroot+"images/border13_05.gif' width='16' height='12' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td style='background-image:url("+request.svcroot+"images/border13_09.gif);background-repeat:repeat-y' width='11'></td>"+
			"		<td width='100%' bgcolor='#FFFFFF' colspan='1' style='padding:0px;'><!--- Content --->"
			)
			break		
	}
}

function SkinBorderEnd(SKIN) {
	switch(SKIN) {
		case 1:
			document.write(
			"		</td>"+
			"		<td style='background-image:url("+request.svcroot+"images/border1_15.gif);background-repeat:repeat-y' width='13'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border1_19.gif' width='11' height='12' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border1_21.gif);background-repeat:repeat-x' colspan='3' height='12'></td>"+
			"		<td><img src='"+request.svcroot+"images/border1_23.gif' width='13' height='12' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"</table>"
			)
			break
		case 2:
			document.write(
			"		</td>"+
			"		<td style='background-image:url("+request.svcroot+"images/border2_16.gif);background-repeat:repeat-y' width='12'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border2_19.gif' width='11' height='14' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border2_20.gif);background-repeat:repeat-x' colspan='4' height='14'></td>"+
			"		<td><img src='"+request.svcroot+"images/border2_22.gif' width='12' height='14' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"</table>"
			)
			break
		case 3:
			document.write(
			"		</td>"+
			"		<td style='background-image:url("+request.svcroot+"images/border3_12.gif);background-repeat:repeat-y' width='9'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border3_17.gif' width='10' height='11' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border3_19.gif);background-repeat:repeat-x' colspan='3' height='11'></td>"+
			"		<td><img src='"+request.svcroot+"images/border3_21.gif' width='9' height='11' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"</table>"
			)
			break
		case 4:
			document.write(
			"		</td>"+
			"		<td style='background-image:url("+request.svcroot+"images/border4_10.gif);background-repeat:repeat-y' width='11'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border4_13.gif' width='11' height='11' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border4_14.gif);background-repeat:repeat-x' colspan='1' height='11'></td>"+
			"		<td><img src='"+request.svcroot+"images/border4_15.gif' width='11' height='11' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"</table>"
			)
			break
		case 5:
			document.write(
			"		</td>"+
			"		<td style='background-image:url("+request.svcroot+"images/border2red_16.gif);background-repeat:repeat-y' width='12'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border2red_19.gif' width='11' height='14' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border2red_20.gif);background-repeat:repeat-x' colspan='4' height='14'></td>"+
			"		<td><img src='"+request.svcroot+"images/border2red_22.gif' width='12' height='14' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"</table>"
			)
			break
		case 6:
			document.write(
			"		</td>"+
			"		<td style='background-image:url("+request.svcroot+"images/border2green_16.gif);background-repeat:repeat-y' width='12'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border2green_19.gif' width='11' height='14' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border2green_20.gif);background-repeat:repeat-x' colspan='4' height='14'></td>"+
			"		<td><img src='"+request.svcroot+"images/border2green_22.gif' width='12' height='14' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"</table>"
			)
			break
		case 7:
			document.write(
			"		</td>"+
			"		<td style='background-image:url("+request.svcroot+"images/border2gray_16.gif);background-repeat:repeat-y' width='12'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border2gray_19.gif' width='11' height='14' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border2gray_20.gif);background-repeat:repeat-x' colspan='4' height='14'></td>"+
			"		<td><img src='"+request.svcroot+"images/border2gray_22.gif' width='12' height='14' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"</table>"
			)
			break
		case 8:
			document.write(
			"		</td>"+
			"		<td style='background-image:url("+request.svcroot+"images/border3red_12.gif);background-repeat:repeat-y' width='9'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border3red_17.gif' width='10' height='11' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border3red_19.gif);background-repeat:repeat-x' colspan='3' height='11'></td>"+
			"		<td><img src='"+request.svcroot+"images/border3red_21.gif' width='9' height='11' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"</table>"
			)
			break
		case 9:
			document.write(
			"		</td>"+
			"		<td style='background-image:url("+request.svcroot+"images/border4gray_10.gif);background-repeat:repeat-y' width='11'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border4gray_13.gif' width='11' height='11' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border4gray_14.gif);background-repeat:repeat-x' colspan='1' height='11'></td>"+
			"		<td><img src='"+request.svcroot+"images/border4gray_15.gif' width='11' height='11' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"</table>"
			)
			break
		case 11:
			document.write(
			"		</td>"+
			"		<td style='background-image:url("+request.svcroot+"images/border5_10.gif);background-repeat:repeat-y' width='5'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border5_13.gif' width='5' height='5' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border5_15.gif);background-repeat:repeat-x' colspan='1' height='5'></td>"+
			"		<td><img src='"+request.svcroot+"images/border5_17.gif' width='5' height='5' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"</table>"
			)
			break
		case 12:
			document.write(
			"	</td><td style='border-right:1px solid gray'></td></tr>"+
			"	<tr><td><img src='"+request.svcroot+"images/box4.gif' width='5' height='5'></td><td style='border-bottom:1px solid gray'></td><td><img src='"+request.svcroot+"images/box3.gif' width='5' height='5'></td></tr>"+
			"	</table>	"
			)
			break
		case 13:
			document.write(
			"		</td>"+
			"		<td style='background-image:url("+request.svcroot+"images/border13_10.gif);background-repeat:repeat-y' width='17'></td>"+
			"	</tr>"+
			"	<tr>"+
			"		<td><img src='"+request.svcroot+"images/border13_13.gif' width='11' height='17' alt='' class='clsNoPrint'></td>"+
			"		<td width='100%' style='background-image:url("+request.svcroot+"images/border13_14.gif);background-repeat:repeat-x' colspan='1' height='17'></td>"+
			"		<td><img src='"+request.svcroot+"images/border13_15.gif' width='17' height='17' alt='' class='clsNoPrint'></td>"+
			"	</tr>"+
			"</table>"
			)		
			break
	}
}

function SkinToggleHide(x) {
	var vshow,vlen,vbod;
	vlen=x.src.length;
	if(x.src.substring(vlen-9,vlen)=="plus2.gif"){vshow="inline";x.src=request.svcroot+"images/minus2.gif";}
	else{vshow="none";x.src=request.svcroot+"images/plus2.gif";}
	vbod=x.parentElement.parentElement.nextSibling;
	vbod.style.display=vshow;
}

///////////// TabCommander ///////////////////

/** Andrew's multi-colored TAB code **/

function colshade(h1,h2,prc)
{
	var hD="0123456789ABCDEF";
	var col,result;
	result="";
	while(h1.length>1)
	{
		col1=parseInt(h1.substring(0,2),16);
		col2=parseInt(h2.substring(0,2),16);
		col=Math.floor(col1+(col2-col1)*prc/100);
		result=result+hD.substring((col>>4),(col>>4)+1)+hD.substring((col&15),(col&15)+1);
		h1=h1.substring(2,h1.length);
		h2=h2.substring(2,h2.length);
	}
	return result;
}
var SVCTABTable=function(varname,tabtableid,tablist,tabcolorlist,tabbgrdimglist,showall,defsel)
{
	var atablist,curcolor,curcolorbright,curcolordark,curbkimg,x;
	this.tabtableid=tabtableid;
	this.tabCount=0;
	if(defsel==null)
		defsel=0;
	this.cursel=defsel;
	this.varname=varname;
	atablist=tablist.split("|");
	this.tabcolorlist=tabcolorlist.split("|");
	if(tabbgrdimglist!=null && tabbgrdimglist!="")
		this.atabbgrdimglist=tabbgrdimglist.split("|");
	document.write("<table id=\""+tabtableid+"\" width=100% cellspacing=0 style=border:0;table-layout:fixed><tr style=height:24px>");
	for(x in atablist)
	{
		this.max=x;
		if(this.tabcolorlist.length>x)
		{
			curcolor=this.tabcolorlist[x];
		}
		curcolorbright=colshade(curcolor,"FFFFFF",60);
		curcolordark=colshade(curcolor,"f0f0f0",75);
		if(this.atabbgrdimglist!=null && this.atabbgrdimglist.length>x)
			curbkimg=this.atabbgrdimglist[x]
		else
			curbkimg="";
		document.write("<td valign=top id=\""+tabtableid+"TD"+x+"\" onmouseover=\"this.firstChild.style.color='white';this.firstChild.style.textDecoration='underline';\" onmouseout="+varname+".mseOut(event,this,"+x+") onclick="+varname+".mseClick(event,this,"+x+") style=\"cursor:pointer;color:white;padding:0;text-align:center;background-repeat:repeat-x;background-color:#"+(defsel==x?curcolor+";filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#"+curcolorbright+"', EndColorStr='#"+curcolor+"')"+(curbkimg!=""?";background-image:url("+request.svcroot+"images/"+curbkimg+")":""):curcolordark+";border-bottom:1px solid black;")+"\">"+
		"<table cellspacing=0 width=100% style=\"color:"+(defsel==x?"white":"#4f4f4f")+";font-weight:bold;text-align:center\"><tr><td valign=top style=padding:0px;width:8px><img src=\""+request.svcroot+"images/tabnew-01.gif\"></td><td style=\"padding:0px;border-top:1px solid black\">"+atablist[x]+"</td><td style=padding:0px;width:9px><img src=\""+request.svcroot+"images/tabnew-02.gif\"></td></tr></table></td>");
	}
	if(showall)
		document.write("<td align=center style=\"width:20ex;border-bottom:1px solid black\"><input class=clsButton type=button value=\""+JSVClang("Show All",6977)+"\" onclick="+varname+".ShowAll()></td>");
	document.write("</tr></table>");
}
SVCTABTable.prototype.mseOut=function(event,obj,pos)
{
	if(this.cursel!=pos)
		obj.firstChild.style.color='#4f4f4f';
	obj.firstChild.style.textDecoration="none";
}
SVCTABTable.prototype.mseClick=function(event,obj,pos)
{
	var curcolor,oldcolor,oldcolordark,curcolorbright,objTD;
	if(this.cursel==pos)
		return;
	if(this.tabcolorlist.length>pos)
		curcolor=this.tabcolorlist[pos]
	else
		curcolor=this.tabcolorlist[this.tabcolorlist.length-1];
	if(this.tabcolorlist.length>this.cursel)
		oldcolor=this.tabcolorlist[this.cursel]
	else
		oldcolor=this.tabcolorlist[this.tabcolorlist.length-1];
	oldcolordark=colshade(oldcolor,"f0f0f0",75);
	curcolorbright=colshade(curcolor,"FFFFFF",60);
	// Old Selection
	objTD=document.getElementById(this.tabtableid+"TD"+this.cursel);
	objTD.firstChild.style.color="#4f4f4f";
	objTD.style.backgroundColor="#"+oldcolordark;
	objTD.style.filter=null;
	objTD.style.borderBottom="1px black solid";
	// Nwq
	objTD=document.getElementById(this.tabtableid+"TD"+pos);
	objTD.firstChild.style.color="white";
	objTD.style.backgroundColor="#"+curcolor;
	objTD.style.filter="progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#"+curcolorbright+"', EndColorStr='#"+curcolor+"')";
	objTD.style.borderBottom="0px";
	document.getElementById(this.tabtableid+this.cursel).style.display="none";
	this.showBlock(pos);
	this.cursel=pos;
}
function getDocHeight(doc) {
  var docHt = 0, sh, oh;
  if (doc.height) docHt = doc.height;
  else if (doc.body) {
    if (doc.body.scrollHeight) docHt = sh = doc.body.scrollHeight;
    if (doc.body.offsetHeight) docHt = oh = doc.body.offsetHeight;
    if (sh && oh) docHt = Math.max(sh, oh);
  }
  return docHt;
}
SVCTABTable.prototype.frameLoad=function(obj,pos)
{	obj.previousSibling.style.display="none";
	obj.style.display="block";
	var docHt = getDocHeight(obj.contentWindow.document);
	if (docHt && obj.style.height!=docHt+"px")
		obj.style.height = docHt+"px";
	var maintab=obj.contentWindow.document.getElementById("MRMmaintable");
	if(maintab)
	{	maintab.setAttribute("POBJ",this);
		// somehow the onresize event does not trigger for tables in firefox :(
		maintab.onresize=new Function("if(this.getAttribute('POBJ'))this.getAttribute('POBJ').frameResize("+pos+");");
/*		if (maintab.addEventListener)
			  maintab.addEventListener('resize', function() { alert('oi'); }, false);
		*/
	}
}
SVCTABTable.prototype.frameResize=function(pos)
{	var objdiv,obj;
	objdiv=document.getElementById(this.tabtableid+pos);
	if(objdiv)
	{	obj=objdiv.getElementsByTagName("IFRAME");
		if(obj!=null&&obj.length>0)
		{	obj=obj[0];
			var docHt = getDocHeight(obj.contentWindow.document);
			if (docHt && obj.style.height!=docHt+"px")
				obj.style.height = docHt+"px";
		}
	}
}
SVCTABTable.prototype.showBlock=function(pos,forcereload)
{	var objdiv,urlloc,loaded,objloaded,o2;
	objdiv=document.getElementById(this.tabtableid+pos);
	objdiv.style.display="block";
	if(objdiv==null)return;
	urlloc=objdiv.getAttribute("URLLOC");
	if(urlloc==null||urlloc=="")return;
	loaded=objdiv.getAttribute("LOADED");
	if(loaded=="0"||forcereload==1)
	{	// reload contents of block
		objdiv.setAttribute("LOADED","1");
		o2=objdiv.firstChild.rows[0].cells[0];
		o2.innerHTML="<div style=\"border:2px solid red;margin:5px;padding:5px\">Loading this section... please wait...</div><IFRAME style=display:none onload=\""+this.varname+".frameLoad(this,"+pos+")\" src=\""+request.webroot+urlloc+"&"+request.mtoken+"\" width=100% height=100% scrolling=no frameborder=0></IFRAME>";
	}
}
SVCTABTable.prototype.startTabBlock=function(pos,urlloc,loaded)
{
	var curcolor,doload;
	if(pos==null)
		pos=this.tabCount;
	if(urlloc==null)
		urlloc="";
	if(loaded==null)
		loaded=1;
	if(this.tabcolorlist.length>pos)
		curcolor=this.tabcolorlist[pos]
	else
		curcolor=this.tabcolorlist[this.tabcolorlist.length-1];
	if(loaded==0 && pos==this.cursel && urlloc!="")
	{	loaded=1;doload=1; }
	document.write("<div id=\""+this.tabtableid+pos+"\" LOADED=\""+loaded+"\" "+(urlloc==""?"":"URLLOC=\""+urlloc+"\" ")+" style=\"width:100%;border:1px black solid;border-top:0px"+(this.cursel!=pos?";display:none":"")+"\"><table width=100% style=\"border:7px solid #"+curcolor+"\"><tr><td>");
	if(doload==1)
		document.write("<div style=\"border:2px solid red;margin:5px;padding:5px\">Loading this section... please wait...</div><IFRAME style=display:none onload=\""+this.varname+".frameLoad(this,"+pos+")\" src=\""+request.webroot+urlloc+"&"+request.mtoken+"\" width=100% height=100% scrolling=no frameborder=0></IFRAME>");
}
SVCTABTable.prototype.endTabBlock=function()
{
	document.write("</td></tr></table></div>");
	this.tabCount=this.tabCount+1;
}
SVCTABTable.prototype.ShowAll=function()
{
	var x,obj;
	obj=document.getElementById(this.tabtableid);
	if(obj!=null)
		obj.style.display="none";
	for(x=0;x<=this.max;x++)
	{
		obj=document.getElementById(this.tabtableid+x);
		obj2=document.getElementById(this.tabtableid+x+"INBORDER");
		if(obj!=null)
		{
			this.showBlock(x);
//			obj.style.display="block";
			obj.style.border="0";
			obj.firstChild.cellPadding=0;
			obj.firstChild.cellSpacing=0;
			obj.firstChild.style.border="0";
		}
		if(obj2!=null)
		{
			obj2.style.border="0";
			obj2.style.padding="0";
		}
	}
}
