function newwin(url) {
  var oth="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left=200,top=200";
  oth = oth+",width=500,height=400";
  var newwin=window.open(url,"newwin",oth);
  newwin.focus();
  return false;
}


function DrawImage(ImgD,FitWidth,FitHeight){
var flag=false;
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0){
flag=true;
if(image.width/image.height>= FitWidth/FitHeight){
if(image.width>FitWidth){ 
ImgD.width=FitWidth;
ImgD.height=(image.height*FitWidth)/image.width;
}else{
ImgD.width=image.width; 
ImgD.height=image.height;
}
}
else{
if(image.height>FitHeight){ 
ImgD.height=FitHeight;
ImgD.width=(image.width*FitHeight)/image.height; 
}else{
ImgD.width=image.width; 
ImgD.height=image.height;
}
}
}
}


function showFlash(sSWF, nWidth, nHeight, sVars, bTransparent)
{//
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+nWidth+'" height="'+nHeight+'">');
	document.write('<param name="movie" value="'+sSWF+'" />');
	if (bTransparent) {
		document.write('<param name="wmode" value="transparent" />');
	}
	if (sVars != undefined) {
		document.write('<param name="FlashVars" value="'+sVars+'" />');
	}
	document.write('</object>');
}



