var SCALABLE='SCLbl';
var dd_u="undefined";
function WZDD(){
this.elements=new Array(0);this.obj=null;this.n=navigator.userAgent.toLowerCase();
this.db=(document.compatMode && document.compatMode.toLowerCase() != "backcompat")?
document.documentElement
: (document.body || null);
this.op=!!(window.opera && document.getElementById);
this.ie=!!(this.n.indexOf("msie") >= 0 && document.all && this.db && !this.op);
this.iemac=!!(this.ie && this.n.indexOf("mac") >= 0);
this.n6=!!(typeof window.getComputedStyle != dd_u && typeof document.createRange != dd_u);
this.w3c=!!(!this.op && !this.ie && !this.n6 && document.getElementById);
this.ce=!!(document.captureEvents && document.releaseEvents);
this.px='px';
this.tiv=this.w3c? 40 : 10;
}
var dd=new WZDD();
dd.Int=function(d_x, d_y){return isNaN(d_y = parseInt(d_x))? 0 : d_y;};
dd.getPageXY=function(d_o){
dd.x=dd.y=0;
while(d_o){dd.x += dd.Int(d_o.offsetLeft);dd.y += dd.Int(d_o.offsetTop);d_o = d_o.offsetParent || null;}
};
dd.getCssXY=function(d_o){
if(d_o.div){
d_o.css.left=d_o.css.top=0+dd.px;dd.getPageXY(d_o.div);d_o.cssx=d_o.x-dd.x;d_o.cssy=d_o.y-dd.y;d_o.css.left=d_o.cssx+dd.px;d_o.css.top=d_o.cssy+dd.px;}
else{d_o.cssx=0;d_o.cssy=0;}
};
dd.getDivW=function(d_o){
return dd.Int(d_o.div? (d_o.div.offsetWidth || d_o.css.pixelWidth || d_o.css.width || 0) : 0);
};
dd.getDivH = function(d_o){
return dd.Int(d_o.div? (d_o.div.offsetHeight || d_o.css.pixelHeight || d_o.css.height || 0) : 0);
};
dd.getWH = function(d_o){d_o.w=dd.getDivW(d_o);d_o.h=dd.getDivH(d_o);
if(d_o.css){
d_o.css.width=d_o.w+dd.px;
d_o.css.height=d_o.h+dd.px;
d_o.dw=dd.getDivW(d_o)-d_o.w;
d_o.dh=dd.getDivH(d_o)-d_o.h;
d_o.css.width=(d_o.w-d_o.dw)+dd.px;
d_o.css.height=(d_o.h-d_o.dh)+dd.px;
}
else d_o.dw=d_o.dh=0;
};
dd.getCssProp = function(d_o, d_pn6, d_pstyle, d_pn4){
if(d_o && dd.n6) return ''+window.getComputedStyle(d_o, null).getPropertyValue(d_pn6);
if(d_o && d_o.currentStyle) return ''+eval('d_o.currentStyle.'+d_pstyle);
if(d_o && d_o.style) return ''+eval('d_o.style.'+d_pstyle);
return '';
};
dd.getDiv=function(d_x,d_d){
d_d=d_d || document;
if(dd.ie) return d_d.all[d_x] || null;
if(d_d.getElementById) return d_d.getElementById(d_x) || null;
return null;
};
dd.getCmd=function(d_o,d_cmd,d_cmdStr){
var d_i=d_o.id.indexOf(d_cmd),d_j,
d_y=(d_i >= 0)*1;
if(d_y){
d_j=d_i+d_cmd.length;
if(d_cmdStr) d_o.cmd += d_o.id.substring(d_i, d_j);
d_o.id=d_o.id.substring(0, d_i)+d_o.id.substring(d_j);
}
return d_y;
};
dd.getCmdVal=function(d_o,d_cmd,d_cmdStr,int0){
var d_i=d_o.id.indexOf(d_cmd),d_j,
d_y=(d_o.id.indexOf(d_cmd) >= 0)? dd.Int(d_o.id.substring(d_o.id.indexOf(d_cmd)+d_cmd.length)) : int0? -1 : 0;
if(!int0 && d_y || int0 && d_y >= 0){
d_j=d_i+d_cmd.length+(""+d_y).length;
if(d_cmdStr) d_o.cmd += d_o.id.substring(d_i, d_j);
d_o.id=d_o.id.substring(0, d_i)+d_o.id.substring(d_j);
}
return d_y;
};
dd.addElt=function(d_o,d_p){
dd.elements[d_o.name]=dd.elements[d_o.index=dd.elements.length]=d_o;
};
dd.initz=function(){
if(!(dd && (dd.n6 || dd.ie || dd.op || dd.w3c))) return;
if(dd.loadFunc) dd.loadFunc();
};
dd.finlz=function(){if(dd.uloadFunc) dd.uloadFunc()};
dd.evt=function(d_e){
this.src=this.e.target || this.e.srcElement || null;
this.x=dd.Int(this.e.pageX || this.e.clientX || 0);this.y = dd.Int(this.e.pageY || this.e.clientY || 0);
};
function DDObj(d_o,d_i){
this.id=d_o;this.cmd='';
this.name = this.id + (d_i || '');
if(!!(this.div=dd.getDiv(this.id)) && typeof this.div.style != dd_u) this.css=this.div.style;
dd.getWH(this);
if(this.div){
this.div.ddObj=this;
this.div.pos_rel=(""+(this.div.parentNode? this.div.parentNode.tagName : this.div.parentElement? this.div.parentElement.tagName : '').toLowerCase().indexOf('body') < 0);
}
dd.getPageXY(this.div);
this.defx=this.x=dd.x;this.defy=this.y=dd.y;dd.getCssXY(this);
this.defz=dd.Int(dd.getCssProp(this.div,'z-index','zIndex','zIndex'));
this.defw=this.w || 0;this.defh=this.h || 0;}
DDObj.prototype.resizeTo=function(d_w,d_h,d_o){
if(!this.div) return;
d_w=(this.w=dd.Int(d_w))-this.dw;
d_h=(this.h=dd.Int(d_h))-this.dh;
if(typeof this.css.pixelWidth != dd_u){
this.css.pixelWidth=d_w;this.css.pixelHeight=d_h;
if(this.is_image){(d_o=this.nimg.style).pixelWidth=d_w;d_o.pixelHeight=d_h;}
}
else{
this.css.width=d_w+dd.px;this.css.height=d_h+dd.px;
if(this.is_image){(d_o=this.nimg).width=d_w;d_o.height=d_h;
if(!d_o.complete) d_o.src=this.src;
}}};
DDObj.prototype.resizeBy=function(d_dw,d_dh){this.resizeTo(this.w+dd.Int(d_dw), this.h+dd.Int(d_dh));};
DDObj.prototype.moveBy=function(d_x,d_y,d_kds,d_o){
if(!this.div) return;
this.x += (d_x=dd.Int(d_x));
this.y += (d_y=dd.Int(d_y));
if(!d_kds != this.defparent){
(d_o=this.css || this.div).left=(this.cssx += d_x)+dd.px;
d_o.top=(this.cssy+=d_y)+dd.px;
}};
DDObj.prototype.setBgColor=function(d_x){if(this.css) this.css.background = d_x;this.bgColor = d_x};
DDObj.prototype.setz=function(d_z){if(this.css) this.css.zIndex=d_z;this.zIndex=d_z};
DDObj.prototype.setFontSize=function(d_z){if(this.css) this.css.fontSize=d_z;this.zIndex=d_z};
DDObj.prototype.setBorder=function(d_z){if(this.css) this.css.borderColor=d_z;this.zIndex=d_z};
DDObj.prototype.setTopP=function(d_z){if(this.css) this.css.paddingTop=d_z;this.zIndex=d_z};
DDObj.prototype.setFontColor=function(d_z){if(this.css) this.css.color=d_z;this.zIndex=d_z};
DDObj.prototype.setCursor=function(d_x){this._setCrs(this.cursor=(d_x.indexOf('c:')+1)? d_x.substring(2) : d_x);};
DDObj.prototype._setCrs=function(d_x){if(this.css) this.css.cursor=((!dd.ie || dd.iemac) && d_x == 'hand')? 'pointer' : d_x;};
DDObj.prototype._free=function(){
for(var d_i in this) this[d_i]=null;
dd.elements[this.name]=null;
};
function SET_DHTML(){
var d_a=arguments,d_ai,d_htm='',d_o,d_i=d_a.length;while(d_i--){
if(!(d_ai=d_a[d_i]).indexOf('c:')) dd.cursor=d_ai.substring(2);
else{d_o=new DDObj(d_ai);dd.addElt(d_o);d_htm += d_o.t_htm || '';}}
if(window.onload) dd.loadFunc=window.onload;
if(window.onunload) dd.uloadFunc=window.onunload;
window.onload=dd.initz;
window.onunload=dd.finlz;}
function convertToHex(theColor){
var dec=theColor;var hexChars="0123456789ABCDEF";
var i=dec % 16;var j=(dec-i)/16;var r=hexChars.charAt(j)+hexChars.charAt(i);return r;}
function cChange(sC, eC, step){
startRed=parseInt(sC.substr(0,2),16);
endRed=parseInt(eC.substr(0,2),16);
sG=parseInt(sC.substr(2,2),16);
endGreen=parseInt(eC.substr(2,2),16);
sB=parseInt(sC.substr(4,2),16);
endBlue=parseInt(eC.substr(4,2),16);
redStep=Math.round((startRed-endRed)/step);
gSt=Math.round((sG-endGreen)/step);
bSt=Math.round((sB-endBlue)/step);
return (convertToHex(startRed-redStep))+(convertToHex(sG-gSt))+(convertToHex(sB-bSt));
}
function trans(x,y,w,h,id,duration,steps,state,startColor,currentStartColor,endColor,currentEndColor) {
stepDuration=Math.round(duration/steps);
obj=dd.elements[id];   
x1=obj.x;y1=obj.y;w1=obj.w;h1=obj.h;x=(x)?x:x1;y=(y)?y:y1;w=(w)?w:w1;h=(h)?h:h1;
difX=(x-x1)/steps;difY=(y-y1)/steps;difW=(w-w1)/steps;difH=(h-h1)/steps;  
obj.moveBy(difX,difY);
obj.resizeBy(difW,difH);
tNSC=cChange(currentStartColor,endColor,steps);
tNBrC=cChange(currentEndColor,startColor,steps);
if (tNSC != '000000') obj.setBgColor('#'+tNSC);
if (tNBrC != '000000'){
obj.setBorder('#'+tNBrC);
obj.setFontColor('#'+tNBrC);
} 
if (state=='on'){
switch(steps){
case 5:obj.setz('503');break;
case 2:obj.setTopP('5px');break;
case 1:obj.setTopP('6px');break;
case 0:obj.setTopP('7px');obj.setFontSize('17px');break;
}}
else{ 
switch(steps){
case 0:obj.setTopP('3px');obj.setFontSize('14px');break;
case 1:obj.setTopP('5px');break;
case 2:obj.setTopP('6px');break;
case 3:obj.setFontSize('15px');obj.setz('500');break;
case 5:obj.setFontSize('16px');break;
}}
duration=(duration-stepDuration);
steps--;
if(steps>=0) setTimeout('trans('+x+','+y+','+w+','+h+',"'+id+'",'+duration+','+steps+',"'+state+'","'+startColor+'","'+tNSC+'","'+endColor+'","'+tNBrC+'")',stepDuration);
return;}
function newsOn(){trans(627,1,162,30,'men0',130,5,'on','E11818','E11818','F4E9E9','F4E9E9')}
function newsOff(){trans(627,4,136,26,'men0',220,5,'off','F4E9E9','F4E9E9','E11818','E11818')}
function gOn(){trans(299,1,176,30,'men1',130,5,'on','09880F','09880F','F6FFEE','F6FFEE')}
function gOff(){trans(327,4,144,26,'men1',220,5,'off','F6FFEE','F6FFEE','09880F','09880F')}
function bjOn(){trans(275,28,112,30,'men2',130,5,'on','E11818','E11818','F4E9E9','F4E9E9')}
function bjOff(){trans(284,32,92,26,'men2',220,5,'off','F4E9E9','F4E9E9','E11818','E11818')}
function vpOn(){trans(665,28,134,30,'men4',130,5,'on','09880F','09880F','F6FFEE','F6FFEE')}
function vpOff(){trans(672,32,112,26,'men4',220,5,'off','F6FFEE','F6FFEE','09880F','09880F')}
function slotsOn(){trans(599,28,76,30,'men3',130,5,'on','424B8F','424B8F','F0F9FF','F0F9FF')}
function slotsOff(){trans(605,32,62,26,'men3',220,5,'off','F0F9FF','F0F9FF','424B8F','424B8F')}
function crapsOn(){trans(376,28,76,30,'men6',130,5,'on','424B8F','424B8F','F0F9FF','F0F9FF')}
function crapsOff(){trans(381,32,62,26,'men6',220,5,'off','F0F9FF','F0F9FF','424B8F','424B8F')}
function pokerOn(){trans(442,28,82,30,'men5',130,5,'on','09880F','09880F','F6FFEE','F6FFEE')}
function pokerOff(){trans(447,32,66,26,'men5',220,5,'off','F6FFEE','F6FFEE','09880F','09880F')}
function rouletteOn(){trans(511,28,100,30,'men7',130,5,'on','E11818','E11818','F4E9E9','F4E9E9')}
function rouletteOff(){trans(518,32,82,26,'men7',220,5,'off','F4E9E9','F4E9E9','E11818','E11818')}
function onlOn(){trans(465,1,172,30,'men8',130,5,'on','424B8F','424B8F','F0F9FF','F0F9FF')}
function onlOff(){trans(476,4,146,26,'men8',220,5,'off','F0F9FF','F0F9FF','424B8F','424B8F')}
