objMenu = null;

var swapImage = function(A){
	var B = A.src;
	var C = B.indexOf('on') != -1 ? B.replace('on', 'off') : B.replace('off', 'on');
	A.src = C;
}

var DoMenu = function(A){
	var B = document.getElementById(A);
	var C = (B.className.toLowerCase() == 'collapse') ? 'expand' : 'collapse';
	B.className = C;
	
	if(objMenu != null && objMenu != B)
		objMenu.className = 'collapse';

	objMenu = B;
}

/////////////////////////////////////////////////////
var ObjWin = null;
function fnShowPic(type,ObjID)
{
	if(ObjWin && ObjWin.open && ! ObjWin.closed)
	{
		ObjWin.location.href="ShowPic.asp?Type="+type+"&ID="+ObjID;
		ObjWin.focus();

 	}
  	else
  	{
		ObjWin=window.open("ShowPic.asp?Type="+type+"&ID="+ObjID,"win","height=500,width=600,left=190,top=0,resizable=yes,scrollbars=no,status=no,toolbar=no,menubar=no,location=no");

  	} 
}
////////////////////////////////////////////////////////
function fnLoadPic(obj)
{
	if(obj.height>obj.width)
	{
		obj.height=110
	} 
	else 
	{
		obj.width=110
	}
}

function WriteFlash(FilePath,Width,Height,IsZIndex){
	if(IsZIndex){
	var str="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width="+Width+" height="+Height+" style='Z-INDEX: 1;  POSITION:absolute; left:0; TOP: 0px'>\n<param name='movie' value="+FilePath+" width="+Width+" height="+Height+" >\n <param name='quality' value='high'>\n <param name='wmode' value='transparent' />\n <param name='SCALE' value='exactfit' <embed src="+FilePath+" width="+Width+" height="+Height+"  quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' scale='exactfit'></embed></object>";
	document.write(str);
		}else{
			var str="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width="+Width+" height="+Height+">\n<param name='movie' value="+FilePath+" width="+Width+" height="+Height+" >\n <param name='quality' value='high'>\n <param name='wmode' value='transparent' />\n <param name='SCALE' value='exactfit' <embed src="+FilePath+" width="+Width+" height="+Height+"  quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' scale='exactfit'></embed></object>";
	document.write(str);
	}
return true;
}