function getObject(name)
{
return document.all ? document.all.item(name) : document.getElementById(name);
}
function chBackColor(a,bgcolor) {a.style.backgroundColor=bgcolor}
function chBackColorImg12 (a,bgcolor,img1name,img1src,img2name,img2src)
{
a.style.backgroundColor=bgcolor
img1name.src=img1src;
img2name.src=img2src;
}
function insert1 (l1, l2, sw)
{
l1_ = getObject(l1);
l2_ = getObject(l2);
sw_ = getObject(sw);
if (l1_.selectedIndex==-1) return;
exist = false;
for ( i=l2_.length-1; i>=0; i-- )
if ( l2_.options[i].value == l1_[l1_.selectedIndex].value ) {
exist = true;
}
if ( !exist )
{
l2_.options[l2_.length] = new Option(l1_[l1_.selectedIndex].text, l1_[l1_.selectedIndex].value);
document.getElementById('hdSubways').value = ''
for ( i=l2_.length-1; i>=0; i-- )
if (document.getElementById('hdSubways').value == '')
{document.getElementById('hdSubways').value = l2_.options[i].value}
else
{document.getElementById('hdSubways').value = document.getElementById('hdSubways').value + ',' + l2_.options[i].value}
}
}
function erase1 (l2)
{
l2_ = getObject(l2)
if (l2_.options.selectedIndex!=-1)
l2_.options[l2_.options.selectedIndex]=null;
document.getElementById('hdSubways').value = ''
for ( i=l2_.length-1; i>=0; i-- )
if (document.getElementById('hdSubways').value == '')
{document.getElementById('hdSubways').value = l2_.options[i].value}
else
{document.getElementById('hdSubways').value = document.getElementById('hdSubways').value + ',' + l2_.options[i].value}
}
function SetDdlValToTbx(Ddl,Tbx)
{
t=getObject(Tbx);
d=getObject(Ddl);
t.value=d.options[d.selectedIndex].value;
}
function show_flash(url,width,height)
{
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ');
document.write('codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,65,0" width="'+width+'" height="'+height+'">');
document.write('<param name=allowScriptAccess value=sameDomain>');
document.write('<param name=movie value="'+url+'">');
document.write('<param name=quality value=high>');
document.write('<param name=wmode value=transparent>');
document.write('<embed src="'+url+'" quality=high width="'+width+'" height="'+height+'" ');
document.write('allowScriptAccess=sameDomain wmode=transparent type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">');
document.write('</object>');
}
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ?
navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if(plugin){
 plugin=(parseInt(plugin.description.substring(plugin.description.indexOf(".")-1))>=4);
}
else if((navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0)&&((navigator.userAgent.indexOf("Windows95")>=0)||(navigator.userAgent.indexOf("Windows 98")>=0)||(navigator.userAgent.indexOf("Windows NT")>=0)))
{
document.write('<'+'SCRIPT LANGUAGE=VBScript'+'>\n');
document.write('on error resume next\n');
document.write('plugin=( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))\n');
document.write('</'+'SCRIPT'+'>');
}

function removeAllOptions(selectbox)
{
var i;
for(i=selectbox.options.length-1;i>=0;i--)
{selectbox.remove(i);}
}
