function open_window(url,name,wth,hgt,display)
{if(wth=='full'){sgswindow=window.open(url);}else{var winwidth=800;var winheight=600;var winname='';var windisplay=',scrollbars=yes,menubar=yes,status=yes';if(wth){winwidth=wth;}
if(hgt){winheight=hgt;}
if(name){winname=name;}
if(display&&display=='plain'){windisplay=',scrollbars=no,menubar=no,status=no';}
sgswindow=window.open(url,winname,'top=100,left=100,resizable=yes,width='+winwidth+',height='+winheight+windisplay);}
sgswindow.focus();}
function FitPic()
{var windowWidth,windowHeight;if(self.innerHeight){windowWidth=self.innerWidth;windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(document.images[0]){windowWidth=document.images[0].width-windowWidth;windowHeight=document.images[0].height-windowHeight;window.resizeBy(windowWidth,windowHeight);}
var video=document.getElementById('flash_video');if(video){windowWidth=video.width-windowWidth;windowHeight=video.height-windowHeight;window.resizeBy(windowWidth,windowHeight);}
self.focus();}
function Generateobj(src,width,height,alt,id,flashvars,js,style){var str='';str+='<!--[if IE]>\n';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+'"'+(id!=''?'id="'+id+'"':'')+(style!=''?'class="'+style+'"':'')+js+'>\n';str+='<param name="movie" value="'+src+'" />\n';str+='<param name="flashvars" value="'+flashvars+'" />\n';str+='<param name="allowscriptaccess" value="always" />\n';str+='<param name="quality" value="best" />\n';str+='<param name="wmode" value="transparent" />\n';str+=(alt!=''?'+ alt +':'')+'\n';str+='</object>\n';str+='<![endif]-->\n';str+='<!--[if !IE]> <-->\n';str+='<object type="application/x-shockwave-flash" data="'+src+'" width="'+width+'" height="'+height+'"'+(id!=''?'id="'+id+'"':'')+(style!=''?'class="'+style+'"':'')+js+'>\n';str+='<param name="flashvars" value="'+flashvars+'" />\n';str+='<param name="allowscriptaccess" value="always" />\n';str+='<param name="quality" value="best" />\n';str+='<param name="wmode" value="transparent" />\n';str+=(alt!=''?'+ alt +':'')+'\n';str+='</object>\n';str+='<!--> <![endif]-->\n';document.write(str);}
