

if(typeof clipdealer=='undefined'){var clipdealer={};}
clipdealer.prevplayer={container:null,host:'',imghost:'',timeout:0,timer:null,variants:{'3':302,'6':226,'7':226,'8':226,'14':226,'15':226,'17':226,'18':226,'22':402,'23':402,'24':402,'25':402,'30':402,'31':402},types:{'3':'mp4','6':'mp4','7':'mp4','8':'mp4','14':'mp3','15':'mp3','17':'mp3','18':'mp3','22':'jpg','23':'jpg','24':'jpg','25':'jpg','30':'jpg','31':'jpg'},h:0,setup:function(host,imghost,timeout)
{this.host=host;this.imghost=(imghost||'');this.timeout=(timeout||250);var d=document.createElement('div');d.className='prevplayer';d.style.position='absolute';d.style.top='0px';d.style.left='0px';d.style.visibility='hidden';lima.getByTagName('body')[0].appendChild(d);this.container=d;lima.events.connect(lima.events,'captureMove',this,'move');},move:function()
{if(this.h<=0){return;}
var pos=lima.events.getMousePos();lima.position.prepare();var vp=lima.getViewport();var pX=pos.x-lima.position.deltaX;var pY=pos.y-lima.position.deltaY;var mX=pos.x+10;var mY=pos.y+10;if(pX+442>vp.w){mX=pos.x-412;}
if(pY+this.h+20>vp.h){mY=pos.y-this.h-10;}
this.container.style.top=mY+'px';this.container.style.left=mX+'px';},show:function(mid,vid)
{if(this.container==null||typeof this.variants[vid]=='undefined'||typeof this.types[vid]=='undefined'){return;}
if(this.timer!=null){window.clearTimeout(this.timer);}
this.h=this.variants[vid];this.container.style.width='402px';this.container.style.height=this.h+'px';var me=this;var cb=function(){if(me.types[vid]=='jpg'){lima.appendTo(me.container,[{'img':{'src':'/resources/images/shim.gif','styles':{'width':'402px','height':'402px','backgroundImage':'url('+me.imghost+mid+'/player/1.jpg)','backgroundRepeat':'no-repeat','backgroundPosition':'center'}}}]);}else{var so=new SWFObject('/resources/swfplayer/mediaplayer.swf','mpl','402',me.h,'9');so.addVariable('height',me.h);so.addVariable('width','402');so.addVariable('file',me.host+mid+'.'+me.types[vid]);if(me.types[vid]=='mp3'){so.addVariable('image',me.imghost+mid+'/player/1.jpg');}
so.addVariable('displayheight',me.h);so.addVariable('displaywidth','402');so.addVariable('searchbar','false');so.addVariable('showicons','true');so.addVariable('shownavigation','false');so.addVariable('thumbsinplaylist','false');so.addVariable('showdigits','false');so.addVariable('playlist','false');so.addVariable('autostart','true');so.addVariable('repeat','true');so.write(me.container);}
me.container.style.visibility='visible';}
this.timer=window.setTimeout(function(){me.timer=null;if(me.h>0){cb();}},this.timeout);},hide:function()
{if(this.container!=null){this.container.style.visibility='hidden';this.h=0;lima.removeChildren(this.container);}}}
/**** LIMA// ****
 * LIMA Application Framework - Base JavaScript Libraries
 * copyright (c) 2006-2008 Harald Lapp <harald.lapp@gmail.com>, all rights reserved
 */

lima.ltk={}
lima.color=function(p,type)
{type=(typeof type=='undefined'?lima.color.type.RGB:type);this.r=0;this.g=0;this.b=0;if(typeof p!='undefined'){this.setColor(p,type);}}
lima.color.type={RGB:1,CMYK:2,HSV:3,BW:4,HEX:5,CH_R:10,CH_G:11,CH_B:12,CH_C:20,CH_M:21,CH_Y:22,CH_K:23}
lima.color.cmyk2rgb=function(p)
{c=(p[0]/100);m=(p[1]/100);y=(p[2]/100);k=(p[3]/100);var r=Math.floor((1-Math.min(1,c*(1-k)+k))*255);var g=Math.floor((1-Math.min(1,m*(1-k)+k))*255);var b=Math.floor((1-Math.min(1,y*(1-k)+k))*255);return[r,g,b];}
lima.color.rgb2cmyk=function(p)
{var c=(1-Math.min(1,p[0]/255));var m=(1-Math.min(1,p[1]/255));var y=(1-Math.min(1,p[2]/255));var k=Math.min(c,Math.min(m,y));c=Math.floor((c-k)*100);m=Math.floor((m-k)*100);y=Math.floor((y-k)*100);k=Math.floor(k);return[c,m,y,k];}
lima.color.hsv2rgb=function(p)
{var h=(p[0]%360);var s=p[1]/100;var v=p[2]/100;if(h<0){h+=360;}
h=h/60;var i=Math.floor(h);var f=h-i;var p=v*(1-s);var q=v*(1-s*f);var t=v*(1-s*(1-f));if(i==0){r=v;g=t;b=p;}else if(i==1){r=q;g=v;b=p;}else if(i==2){r=p;g=v;b=t;}else if(i==3){r=p;g=q;b=v;}else if(i==4){r=t;g=p;b=v;}else{r=v;g=p;b=q;}
return[Math.floor(r*255),Math.floor(g*255),Math.floor(b*255)];}
lima.color.rgb2hsv=function(p)
{var r=p[0];var g=p[1];var b=p[2];var v=Math.max(r,Math.max(g,b));var x=Math.min(r,Math.min(g,b));var s=(v-x)/v;var rtemp=(v-r)*60/(v-x);var gtemp=(v-g)*60/(v-x);var btemp=(v-b)*60/(v-x);if(r==v){if(g==x){var h=300+btemp;}else{var h=60-gtemp;}}else if(g==v){if(b==x){var h=60+rtemp;}else{var h=180-btemp;}}else{if(r==x){var h=180+gtemp;}else{var h=300-rtemp;}}
return[h,s,v];}
lima.color.bw2rgb=function(p)
{var rgb=Math.floor((p[0]/100)*255);return[rgb,rgb,rgb];}
lima.color.rgb2bw=function(p)
{var bw=Math.floor((p[0]*0.31+p[1]*0.46+p[2]*0.23)/255*100);return[bw,bw,bw];}
lima.color.rgb2hex=function(p)
{var r='0'+(p[0].toString(16));var g='0'+(p[1].toString(16));var b='0'+(p[2].toString(16));return'#'
+r.substring(r.length-2)
+g.substring(g.length-2)
+b.substring(b.length-2);}
lima.color.hex2rgb=function(p)
{p=p.replace(/^#/,'');if(p.length==3){p=p.substr(1,1)+p.substr(1,1)+
p.substr(2,1)+p.substr(2,1)+
p.substr(3,1)+p.substr(3,1);}
return[parseInt('0x'+p.substring(0,2),16),parseInt('0x'+p.substring(2,4),16),parseInt('0x'+p.substring(4,6),16)];}
lima.color.getBrightness=function(p)
{return Math.floor(Math.sqrt(p[0]*p[0]*.241+p[1]*p[1]*.691+p[2]*p[2]*.068));}
lima.color.blend=function(a,b,alpha)
{return[Math.round(a[0]+(b[0]-a[0])*alpha),Math.round(a[1]+(b[1]-a[1])*alpha),Math.round(a[2]+(b[2]-a[2])*alpha)];}
lima.color.prototype.setColor=function(p,type)
{var rgb=[];switch(type){case lima.color.type.RGB:rgb=p;break;case lima.color.type.CMYK:rgb=lima.color.cmyk2rgb(p);break;case lima.color.type.HSV:rgb=lima.color.hsv2rgb(p);break;case lima.color.type.BW:rgb=lima.color.bw2rgb(p);break;case lima.color.type.HEX:rgb=lima.color.hex2rgb(p);break;case lima.color.type.CH_R:rgb=[p,0,0];break;case lima.color.type.CH_G:rgb=[0,p,0];break;case lima.color.type.CH_B:rgb=[0,0,p];break;case lima.color.type.CH_C:rgb=lima.color.cmyk2rgb([p,0,0,0]);break;case lima.color.type.CH_M:rgb=lima.color.cmyk2rgb([0,p,0,0]);break;case lima.color.type.CH_Y:rgb=lima.color.cmyk2rgb([0,0,p,0]);break;case lima.color.type.CH_K:rgb=lima.color.cmyk2rgb([0,0,0,p]);break;default:return;}
this.r=rgb[0];this.g=rgb[1];this.b=rgb[2];}
lima.color.prototype.getColor=function(type)
{var ret=null;var p=[this.r,this.g,this.b];switch(type){case lima.color.type.RGB:ret=p;break;case lima.color.type.CMYK:ret=lima.color.rgb2cmyk(p);break;case lima.color.type.HSV:ret=lima.color.rgb2hsv(p);break;case lima.color.type.BW:ret=lima.color.rgb2bw(p);break;case lima.color.type.HEX:ret=lima.color.rgb2hex(p);break;case lima.color.type.CH_R:ret=this.r;break;case lima.color.type.CH_G:ret=this.g;break;case lima.color.type.CH_B:ret=this.b;break;case lima.color.type.CH_C:ret=lima.color.rgb2cmyk(p)[0];break;case lima.color.type.CH_M:ret=lima.color.rgb2cmyk(p)[1];break;case lima.color.type.CH_Y:ret=lima.color.rgb2cmyk(p)[2];break;case lima.color.type.CH_K:ret=lima.color.rgb2cmyk(p)[3];break;default:break;}
return ret;}
lima.modal=function(windom,parent)
{this.tabIndexes=[];this.refs=null;this.fixed=true;this.windom=windom;this.center={'x':true,'y':true};this.parent=(typeof parent=='undefined'?document:typeof parent=='object'?parent:lima.getById(parent));}
lima.modal.tabTags=['A','BUTTON','TEXTAREA','INPUT','IFRAME'];lima.modal.prototype.setFixed=function(fixed)
{this.fixed=!!fixed;}
lima.modal.prototype.setCenter=function(center)
{if(typeof center=='undefined'){this.center={'x':true,'y':true};}else{this.center.x=(typeof center.x=='undefined'||!!center.x);this.center.y=(typeof center.y=='undefined'||!!center.y);}}
lima.modal.prototype.setBgOpacity=function(opacity)
{if(typeof this.refs['background']!='undefined'){lima.setOpacity(this.refs['background'],opacity);}}
lima.modal.prototype.setBgSize=function()
{var body=lima.getByTagName('BODY')[0];var vp=lima.getViewport();var h=(vp.h>body.scrollHeight?vp.h:body.scrollHeight);var w=(vp.w>body.scrollWidth?vp.w:body.scrollWidth);this.refs['background'].style.height=h+'px';this.refs['background'].style.width=w+'px';}
lima.modal.prototype.calcWindowPos=function()
{var body=lima.getByTagName('BODY')[0];var vp=lima.getViewport();var h=vp.h;var w=vp.w;var left=(window.XMLHttpRequest==null?((e=document.documentElement.scrollLeft)?e:document.body.scrollLeft):0);var top=(window.XMLHttpRequest==null?((e=document.documentElement.scrollTop)?e:document.body.scrollTop):0);var div=this.refs['window'];return{'x':Math.max((left+(w-div.offsetWidth)/2),0),'y':Math.max((top+(h-div.offsetHeight)/2),0)};}
lima.modal.prototype.setWindowPos=function(xy)
{if(typeof xy!='undefined'){this.refs['window'].style.left=xy.x+'px';this.refs['window'].style.top=xy.y+'px';}else{var xy=this.calcWindowPos();var div=this.refs['window'];if(this.center.x){div.style.left=xy.x+'px';}
if(this.center.y){div.style.top=xy.y+'px';}}}
lima.modal.prototype.initModal=function()
{var body=lima.getByTagName('BODY')[0];var refs=lima.appendTo(body,[{'div':{'styles':{'visibility':'hidden','top':'0px','left':'0px','height':'100%','width':'100%','backgroundColor':'#000','position':'fixed'},'_mkRef':'background'}}]);this.refs={'background':refs['background']};this.refs['background'].style.zIndex=1000;var isIE6=false;var me=this;var style;if(isIE6&&this.refs['background'].style.setExpression){style=this.refs['background'].style;style.position='absolute';style.height='0';style.width='0';style.setExpression('width',function(){return document.documentElement.clientWidth+'px';});style.setExpression('height',function(){return document.documentElement.clientHeight+'px';});}
if(typeof this.windom=='object'){refs=lima.appendTo(body,[{'div':{'_mkRef':'window','_children':this.windom}}]);}else{refs=lima.appendTo(body,[{'div':{'_mkRef':'container'}}]);refs['window']=lima.getById(this.windom);refs['container'].appendChild(refs['window']);}
this.refs['window']=refs['window'];this.refs['window'].style.zIndex=1001;if(isIE6&&this.refs['window'].style.setExpression){style=this.refs['window'].style;style.position='absolute';if(this.fixed){style.setExpression('left',function(){return me.calcWindowPos().x+'px';});style.setExpression('top',function(){return me.calcWindowPos().y+'px';});}}else{this.refs['window'].style.position=(this.fixed?'fixed':'absolute');}
if(typeof window.onresize!='function'){window.onresize=function(){me.onresize();};}else{var vec=window.onresize;window.onresize=function(){vec();me.onresize();}}}
lima.modal.prototype.onresize=function()
{this.setWindowPos();this.setBgSize();}
lima.modal.prototype.hideModal=function()
{if(this.refs==null){return;}
this.refs.background.style.visibility='hidden';this.refs.window.style.visibility='hidden';}
lima.modal.prototype.showModal=function(mousepos)
{var mousepos=mousepos||true;if(this.refs==null){this.initModal();}
if(mousepos){var xy=lima.events.getMousePos();xy.y+='20';this.setWindowPos(xy);}
this.refs.background.style.visibility='visible';this.refs.window.style.visibility='visible';this.onresize();}
lima.modal.prototype.disableTabIndexes=function()
{if(!document.all){return;}
var obj=lima.getByTagNames(lima.modal.tabTags);this.tabIndexes=[];var idx=0;for(var i=0,len=obj.length;i<len;++i){this.tabIndexes[idx++]={'ref':obj[i],'idx':obj[i].tabIndex}
obj[i].tabIndex='-1';}}
lima.modal.prototype.enableTabIndexes=function()
{if(!document.all||this.tabIndexes.length==0){return;}
for(var i=0,len=this.tabIndexes.length;i<len;++i){this.tabIndexes[i].ref.tabIndex=this.tabIndexes[i].idx;}}
lima.modal.prototype.hideFormElements=function()
{var obj=lima.getByTagName('SELECT',this.parent);for(var i=0,len=obj.length;i<len;++i){obj[i].style.visibility='hidden';}}
lima.modal.prototype.showFormElements=function()
{var obj=lima.getByTagName('SELECT',this.parent);for(var i=0,len=obj.length;i<len;++i){obj[i].style.visibility='visible';}}
/**** //LIMA ****/

lima.ltk.widget=function()
{this.spinner=null;this.bgcolor=null;this.widget=null;}
lima.ltk.widget.registry={};lima.ltk.widget.register=function(classname,obj)
{if(typeof lima.ltk.widget.registry[classname]!='undefined'){throw'widget was registered before!';}else{lima.ltk.widget.registry[classname]=obj;}}
lima.ltk.widget.prototype.prepare=function()
{throw'method "prepare" not implemented!';}
lima.ltk.widget.prototype.referenceable=function()
{return(this.widget.getAttribute('name')||this.widget.getAttribute('id'));}
lima.ltk.widget.prototype.addEvent=function(target,type,cb)
{}
lima.ltk.widget.prototype.removeEvent=function()
{}
lima.ltk.widget.prototype.getValue=function()
{return null;}
lima.ltk.widget.prototype.loadIndicator=function(show)
{if(this.spinner==null){var col=lima.getBackgroundColor(this.widget);var img=(lima.color.getBrightness(lima.color.hex2rgb(col))<130?'ltk_spinner_white':'ltk_spinner_black');this.spinner={'back':document.createElement('div'),'front':document.createElement('div')}
this.spinner.back.className='ltk_spinner_back';this.spinner.back.style.backgroundColor=col;this.spinner.front.className='ltk_spinner '+img;this.widget.appendChild(this.spinner.back);this.widget.appendChild(this.spinner.front);}
if(show){var width=this.widget.offsetWidth;var height=this.widget.offsetHeight;this.spinner.back.style.width=width+'px';this.spinner.back.style.height=height+'px';this.spinner.back.style.visibility='visible';this.spinner.front.style.width=width+'px';this.spinner.front.style.height=height+'px';this.spinner.front.style.visibility='visible';}else{this.spinner.back.style.visibility='hidden';this.spinner.front.style.visibility='hidden';}}
lima.ltk.widget.prototype.build=function(def,parent)
{if(typeof def['children']=='undefined'){return;}
var type,widget,instance,e,j,child,c,ccnt;for(var i=0,cnt=def['children'].length;i<cnt;++i){child=null;for(j in def['children'][i]){child=def['children'][i][j];break;}
if(child==null){continue;}
type=(j.substr(0,4)=='ltk_'?'':'ltk_')+j;if(typeof lima.ltk.widget.registry[type]=='undefined'){continue;}
widget=lima.ltk.widget.registry[type];if(typeof widget.container=='undefined'){e=document.createElement('div');}else{e=document.createElement(widget.container);}
e.className=type;if(typeof child['styles']!='undefined'){lima.setStyles(obj,child['styles']);}
if(typeof child['classes']!='undefined'&&child['classes'].length>0){e.className+=' '+child['classes'].join(' ');}
instance=new widget(e);instance.build(child);if(typeof parent=='undefined'){this.widget.appendChild(e);}else{parent.appendChild(e);}}}
lima.ltk.corner=function(obj)
{this.widget=obj}
lima.ltk.widget.register('ltk_rounded',lima.ltk.corner);lima.ltk.corner.prototype=new lima.ltk.widget();lima.ltk.corner.sizex=5;lima.ltk.corner.sizey=5;lima.ltk.corner.prototype.prepare=function(bk_transparent)
{var hex_bk,rgb_bk,hex_color,rgb_color;var sizex=lima.ltk.corner.sizex;var sizey=lima.ltk.corner.sizey;hex_color=lima.getComputedStyle(this.widget,'background-color')
hex_bk=lima.getBackgroundColor(this.widget);rgb_color=lima.color.hex2rgb(hex_color);rgb_bk=lima.color.hex2rgb(hex_bk);hex_bk=(typeof bk_transparent!='undefined'&&bk_transparent?'transparent':hex_bk);_addContainer(this.widget,sizex,sizey);_addRounded(this.widget,hex_bk,rgb_bk,hex_color,rgb_color,sizex,sizey);function _addContainer(el,sizex,sizey){var d=document.createElement('div');d.style.marginLeft=sizex+'px';d.style.marginRight=sizex+'px';while(el.firstChild){d.appendChild(el.firstChild);}
el.appendChild(d);}
function _addRounded(el,hex_bk,rgb_bk,hex_color,rgb_color,sizex,sizey){var i,j;var d1=document.createElement('div');d1.style.backgroundColor=hex_bk;d1.className='ltk_corner';var d2=document.createElement('div');d2.style.backgroundColor=hex_bk;d2.className='ltk_corner';var lastarc=0;for(i=1;i<=sizey;i++){var coverage,arc2,arc3;arc=Math.sqrt(1.0-Math.sqr(1.0-i/sizey))*sizex;var n_bg=sizex-Math.ceil(arc);var n_fg=Math.floor(lastarc);var n_aa=sizex-n_bg-n_fg;var x1=document.createElement("div");var x2=document.createElement("div");var y1=d1;var y2=d2;x1.style.margin="0px "+n_bg+"px";x2.style.margin="0px "+n_bg+"px";for(j=1;j<=n_aa;j++){if(j==1){if(j==n_aa){coverage=((arc+lastarc)*.5)-n_fg;}else{arc2=Math.sqrt(1.0-Math.sqr(1.0-(n_bg+1)/sizex))*sizey;coverage=(arc2-(sizey-i))*(arc-n_fg-n_aa+1)*.5;}}else if(j==n_aa){arc2=Math.sqrt(1.0-Math.sqr((sizex-n_bg-j+1)/sizex))*sizey;coverage=1.0-(1.0-(arc2-(sizey-i)))*(1.0-(lastarc-n_fg))*.5;}else{arc3=Math.sqrt(1.0-Math.sqr((sizex-n_bg-j)/sizex))*sizey;arc2=Math.sqrt(1.0-Math.sqr((sizex-n_bg-j+1)/sizex))*sizey;coverage=((arc2+arc3)*.5)-(sizey-i);}
x1.style.backgroundColor=lima.color.rgb2hex(lima.color.blend(rgb_bk,rgb_color,coverage));y1.appendChild(x1);y1=x1;x1=document.createElement("div");x1.style.margin="0px 1px";x2.style.backgroundColor=lima.color.rgb2hex(lima.color.blend(rgb_bk,rgb_color,coverage));y2.insertBefore(x2,y2.firstChild);y2=x2;x2=document.createElement("div");x2.style.margin="0px 1px";}
x1.style.backgroundColor=hex_color;y1.appendChild(x1);x2.style.backgroundColor=hex_color;y2.insertBefore(x2,y2.firstChild);lastarc=arc;}
el.insertBefore(d1,el.firstChild);el.appendChild(d2);}}