/*--------------------- General styles start ---------------------*/
body {margin: 0;font: 12px/16px 'Arial';color: #fff;text-align: center;background: url(/.s/t/786/1.jpg);}
td, input {font: 11px 'Arial';}
body a {color: #fff;text-decoration: underline;}
body a:hover {text-decoration: none;}
* {resize: none;}
img {border: 0;}
a.noun img {margin: 2px;}
.clear {clear: both;}
h1, h2, h3, h4, h5, h6 {}
hr {border: 0; height: 1px; background: #362316;}
*:focus {outline: none;}
/*--------------------- General styles end ---------------------*/

/*All content, common styles*/
#wrap {}
#container {width: 1003px;margin: auto;text-align: left;color: #333;}
#container td {color: #333;}
#content {}
#content-top {height: 28px;background: url(http://slovo-boga.ucoz.net/image/312715676d.jpg)no-repeat 5px 0;overflow: hidden;}
#content-mid {background: url(http://slovo-boga.ucoz.net/image/312715676c.jpg) repeat-y 5px 0;width: 1003px;}
#content-bottom {height: 16px;background: url(/.s/t/786/4.png) no-repeat 5px 0;overflow: hidden;}
.sidebar {color: #f7dfba;float: left;width: 211px;padding: 5px 0;font: 11px 'Verdana';}
#container .sidebar td {color: #f7dfba;font: 11px 'Verdana';}
.sidebar a {color: #fff1dd;}
.maincont {float: left;margin: 20px 0 0 20px;width: 690px;padding-bottom: 20px;}
.maincont a {color: #000;}
/*-----------*/

/*Header*/
#header {width: 1003px;background: url(/.s/t/786/5.png) no-repeat;}

#header .searchform {height: 18px;width: 223px; float: right;margin: 0 47px 5px 0;background: url(/.s/t/786/6.png) no-repeat;}
#header .schQuery {float: left;}
#header .schQuery input {width: 193px !important;height: 18px !important;margin: 0 0 0 7px !important;background: none !important; border: none !important; font: 11px 'Century Gothic' !important; color: #878787;padding: 0 !important;box-shadow: none !important;}
#header .schBtn {float: left;}
#header .schBtn input {margin: 0 !important;height: 18px !important;display: inline;background: none !important; border: none !important; font-size: 0 !important; color: transparent !important;cursor: pointer;padding: 0 6px;}

#site-logo {display: block;float: left;margin: 55px 0 0 10px;padding: 0;font: bold 32px 'Century Gothic';color: #fbe8cf;}

.usermenu {float: right;margin: 32px 45px 0 0;}
.usermenu ul {margin: 0;padding: 0;list-style: none;}
.usermenu li {float: left;height: 34px;margin-left: 10px;}
.usermenu li a {display: block;float: left;height: 34px;font: italic 11px/28px 'Verdana';color: #ffffff;text-decoration: none;}
.usermenu li a:hover {}
.usermenu li a span {display: block;height: 34px;float: left;cursor: pointer;}
span.tm-left {background: url(/.s/t/786/7.png);width: 9px;}
span.tm-mid {background: url(/.s/t/786/8.png);}
span.tm-right {background: url(/.s/t/786/9.png);width: 14px;}
.usermenu li a:hover span {background-position: 0 -34px;line-height: 22px;}
.usermenu li a span span {background-position: 0 8px;background-repeat: no-repeat;padding-left: 17px;}
.usermenu li a:hover span span {background-position: 0 5px;}
.tm-home span {background-image: url(/.s/t/786/10.png);}
.tm-profile span {background-image: url(/.s/t/786/11.png);}
.tm-log span {background-image: url(/.s/t/786/12.png);}
.tm-rss span {background-image: url(/.s/t/786/13.png);}

.whois {}
.whois a {}
/*------*/

/*Sidebar*/
.block {width: 211px;margin-bottom: 12px;}
.block:last-child {margin-bottom: 0;}
.block-top {height: 6px;background: url(/.s/t/786/14.png);overflow: hidden;}
.block-mid {background: url(/.s/t/786/15.png);padding: 10px 0;}
.block-bottom {height: 10px;background: url(/.s/t/786/16.png);overflow: hidden;}

.blocktitle {text-align: center;margin: 0 30px 0 15px;line-height: 16px;}
.bt-inside {display: inline-block;padding: 0 10px 2px 10px;font: 14px/16px 'Century Gothic';color: #5f422b;border-radius: 5px;background: url(/.s/t/786/17.jpg);}

.blockcontent {margin: 7px 30px 5px 15px;}
.bc-inside {width: 166px;}
.blockcontent ul {margin: 0; padding: 0;}
.blockcontent li {margin: 0 0 3px 15px;}

.uMenuH li {float:left;padding: 0 5px;}

.uMenuV, .uMenuV ul {margin: 0 0 0 10px;padding: 0;}
.uMenuV li {margin: 0 0 7px 0;list-style: none;}
.uMenuV .uMenuItem {}
.uMenuV li a {font: 12px 'Verdana';color: #fcfad7;text-decoration: none;}
.uMenuV li a:hover, .uMenuV .uMenuItemA {color: #fff;}

.uMenuV .uMenuItemA {}
.uMenuV a.uMenuItemA:link {}
.uMenuV a.uMenuItemA:visited {}
.uMenuV a.uMenuItemA:hover {}
.uMenuV .uMenuArrow {}

.block .xw-tl,.block .xw-bl,.block .u-menuvsep {display:none;}
.block .xw-ml,.block .xw-mr {margin:0;padding:0;background:none !important;}
.block .xw-mc {color:#333; font-weight: normal; float: none; margin: 0; padding: 0; line-height:28px;border-radius: 5px;
background: url(/.s/t/786/18.gif) !important; border: 1px solid #998879 !important;border-top: none !important;border-bottom: 1px solid #a69889 !important;
}
.block .u-menubody {border: 0 !important; padding: 10px 0;}
.block .u-menuvitem {background: none !important; padding: 2px 35px 2px 20px; line-height:28px;text-decoration: none;}
.block .u-menuvitem span {font: 12px 'Verdana';color:#28241f;text-decoration: none;}
.block .u-menuitemhl {background: none !important; padding: 2px 35px 2px 20px; line-height:28px;}
.block .u-menuitemhl span {text-decoration: none;color: #efebe6;}
.block .u-menuarrow {position: absolute; right: 10px; top: 7px;width: 4px; height: 7px; overflow: hidden; background: url(/.s/t/786/19.gif);}
.block .u-menuitemhl .u-menuarrow {background-position: 0 -7px !important;}
.block .u-menu {margin-left: 0;}

#soc {height:22px;text-align: center;}
#soc a {float: left;display: block; width: 22px; height: 22px; margin-right: 7px;overflow: hidden;text-decoration: none;outline: none;}
#soc a:hover { background-position: 0 -22px;}
#soc a:last-child {margin: 0;}
.soc-rss { background: url(/.s/t/786/20.png);}
.soc-del { background: url(/.s/t/786/21.png);}
.soc-facebook { background: url(/.s/t/786/22.png);}
.soc-memori { background: url(/.s/t/786/23.png);}
.soc-twitter { background: url(/.s/t/786/24.png);}
.soc-vkontakte { background: url(/.s/t/786/25.png);}

/*-------*/

/*MainContent*/
/*--------*/

/*Footer*/
#footer {margin: 15px 0 15px 200px;font: 10px 'Verdana';color: #ffeec8;}
#footer a {color: #fff;}
#copyright {}
#powered-by {}
#powered-by img {vertical-align: middle;}
/*------*/

/* Module Part Menu */
.catsTable {}
.catsTable td {}
.catsTd {}
.catName {}
.catNameActive {}
.catNumData {}
.catDescr {}
a.catName:link {}
a.catName:visited {}
a.catName:hover {}
a.catName:active {}
a.catNameActive:link {}
a.catNameActive:visited {}
a.catNameActive:hover {}
a.catNameActive:active {}
/* ----------------- */

/* Entries Style */
.eBlock {}
.eTitle {padding: 0 22px;font: bold 12px/22px 'Times New Roman';font-size: 16pt;color: #968375;background: url(http://slovo-boga.ucoz.net/image/605.png);border-radius: 8px;box-shadow: inset 0 1px 6px #9c8875;}
.eTitle a {font-size: 16pt; color: #968375;text-decoration: none;}
.eTitle a:hover {color: #967588 ;}

.eMessage, .eText {text-align: Bookman Old Style; font-size: 16pt;color: #FFDAB9;padding: 5px 0 }
.eMessage a, .eText a {text-align: Bookman Old Style; font-size: 16pt;color: #FFDAB9;padding: 5px 0}
.eMessage img, .eText img {}
.eDetails, .eDetails1, .eDetails2 {padding: 10px 5px 0 5px;background: url(/.s/t/786/27.png) repeat-x;color: #451705;font: 14px 'Times New Roman';font-weight:bold;}
.eDetails a, .eDetails1 a, .eDetails2 a {color: #ebc2af;text-decoration: none;background: url(/.s/t/786/28.png);padding: 5px;border-radius: 8px;}
.eDetails a:hover, .eDetails1 a:hover, .eDetails2 a:hover {color: #da70d6;}
.eDetails div, .eDetails1 div, .eDetails2 div {font-size: 10px;font-family: 'Times New Roman';}
.eDetails div a, .eDetails1 div a, .eDetails2 div a {background: none;}
.eDetails {}
.eDetails1 {}
.eDetails2 {}

.eRating {}
.eAttach {}
/* ------------- */

/* Entry Manage Table */
.manTable {}
.manTdError {}
.manTd1 {}
.manTd2 {}
.manTd3 {}
.manTdSep {}
.manHr {}
.manTdBrief {}
.manTdText {}
.manTdFiles {}
.manFlFile {}
.manTdBut {}
.manFlSbm {}
.manFlRst {}
.manFlCnt {}
/* ------------------ */

/* Comments Style */
.cAnswer {}
.cBlock1, .cBlock2 {border-top: 1px dashed #362316;font-size: 11px;padding: 5px;}
.cBlock1 {}
.cBlock2 {}
/* -------------- */

/* Comments Form Style */
.commTable {}
.commTd1 {}
.commTd2 {}
.commFl {}
.smiles {}
.commReg {}
.commError {}
.securityCode {}
/* ------------------- */

/* Archive Menu */
.archUl {}
.archLi {}
a.archLink:link {}
a.archLink:visited {}
a.archLink:hover {}
a.archLink:active {}
/* ------------ */

/* Archive Style */
.archiveCalendars {}
.archiveDateTitle {}
.archEntryHr {}
.archiveeTitle li {}
.archiveEntryTime {}
.archiveEntryComms {}
a.archiveDateTitleLink:link {}
a.archiveDateTitleLink:visited {}
a.archiveDateTitleLink:hover {}
a.archiveDateTitleLink:active {}
.archiveNoEntry {}
/* ------------- */

/* Calendar Style */
.calTable {}
.calTable td {padding: 3px;font-size: 11px;}
.calMonth {}
.calWday {text-transform: uppercase;}
.calWdaySe, .calWdaySu {font-weight: bold;text-transform: uppercase;}
.calMday {}
.calMdayA, .calMdayIsA {border: 1px solid red;}
.calMdayIs {}
a.calMonthLink:link,a.calMdayLink:link {}
a.calMonthLink:visited,a.calMdayLink:visited {}
a.calMonthLink:hover,a.calMdayLink:hover {}
a.calMonthLink:active,a.calMdayLink:active {}
/* -------------- */

/* Poll styles */
.pollBut {}

.pollBody {}
.textResults {}
.textResultsTd {}

.pollNow {}
.pollNowTd {}

.totalVotesTable {}
.totalVotesTd {}
/* ---------- */

/* User Group Marks */
a.groupModer:link,a.groupModer:visited,a.groupModer:hover {color:blue;}
a.groupAdmin:link,a.groupAdmin:visited,a.groupAdmin:hover {color:red;}
a.groupVerify:link,a.groupVerify:visited,a.groupVerify:hover {color:green;}
/* ---------------- */

/* Other Styles */
.replaceTable {}
.legendTd {}
.bbCodeBlock, .bbQuoteBlock {margin: 8px 0;}
.codeMessage {padding: 5px;font: 11px 'Consolas', 'Courier New', 'sans-serif';background-color: #ebebeb;color: #000;}
.quoteMessage {
margin: 0 0 20px 0;padding: 0 0 0 10px;color: #666;font-style: italic; border-style: none !important; border-left: 3px solid #4c4c4c !important;
}
/* ------------ */

/* ===== forum Start ===== */
/* General forum Table View */
.forumContent, .forumContent td {font-size: 10px;color: #6c5d52;}
.forumContent a, .forumContent td a {color: #18191b;}
.gTable {background: none;border-spacing: 2px;}
.gTable td {background: url(/.s/t/786/29.jpg);color: #6c5d52;padding: 5px 7px;font-size: 11px;font-style: normal;}
.forumContent .gTable td {background: url(/.s/t/786/30.png);}
.gTable td a {color: #6c5d52;}
.forumContent td.gTableTop {font: 12px/20px 'Verdana';background: url(/.s/t/786/31.png);box-shadow: inset 1px 1px 1px #807e7e;text-transform: uppercase;color: #6c5d52 !important;padding: 0 20px 0 50px;}
td.gTableTop a {font: 12px/20px 'Verdana';color: #6c5d52;text-decoration: none;}
td.gTableTop a:hover {text-decoration: underline;}
.forumContent td.gTableSubTop, .forumContent td.postTdTop {background: url(/.s/t/786/32.png);font: 10px/20px 'Verdana';color: #6c5d52;padding: 0 10px;}
td.gTableSubTop a, td.postTdTop a {color: #6c5d52;}
.gTableBody {}
.gTableBody1 {}
.gTableBottom {}
.gTableLeft {}
.gTableRight {}
.gTableError {}
/* ------------------------ */

/* Forums Styles */
.forumNameTd,.forumLastPostTd {}
.forumIcoTd,.forumThreadTd,.forumPostTd {}
.forumLastPostTd,.forumArchive {}

a.catLink:link {}
a.catLink:visited {}
a.catLink:hover {}
a.catLink:active {}

.lastPostGuest,.lastPostUser,.threadAuthor {}
.archivedForum{}
/* ------------- */

/* forum Titles & other */
.forum {font-weight: bold;}
.forumDescr,.forumModer {font-size: 10px;}
.forumViewed {}
a.forum:link, a.lastPostUserLink:link, a.forumLastPostLink:link, a.threadAuthorLink:link {}
a.forum:visited, a.lastPostUserLink:visited, a.forumLastPostLink:visited, a.threadAuthorLink:visited {}
a.forum:hover, a.lastPostUserLink:hover, a.forumLastPostLink:hover, a.threadAuthorLink:hover {}
a.forum:active, a.lastPostUserLink:active, a.forumLastPostLink:active, a.threadAuthorLink:active {}
/* -------------------- */

/* forum Navigation Bar */
.forumNamesBar {}
.forumBarKw {}
a.forumBarA:link {}
a.forumBarA:visited {}
a.forumBarA:hover {}
a.forumBarA:active {}
/* -------------------- */

/* forum Fast Navigation Blocks */
.fastNav,.fastSearch,.fastLoginForm {}
/* ---------------------------- */

/* forum Fast Navigation Menu */
.fastNavMain {}
.fastNavCat {}
.fastNavCatA {}
.fastNavForumA {}
/* -------------------------- */

/* forum Page switches */
.switches {}
td.pagesInfo, td.switch, td.switchActive {background: #ffffff; padding-left: 5px; padding-right: 5px;}
td.switch, td.switchActive { background: url(/.s/t/786/31.png); color: #6c5d52;}
td.switch a {color: #6c5d52;}
.switch {}
.switchActive {}
a.switchDigit:link,a.switchBack:link,a.switchNext:link {}
a.switchDigit:visited,a.switchBack:visited,a.switchNext:visited {}
a.switchDigit:hover,a.switchBack:hover,a.switchNext:hover {}
a.switchDigit:active,a.switchBack:active,a.switchNext:active {}
/* ------------------- */

/* forum Threads Style */
.threadLink {font-weight: bold;}
.threadNametd,.threadAuthTd,.threadLastPostTd {}
.threadIcoTd,.threadPostTd,.threadViewTd {}
.threadLastPostTd {}
.threadDescr {}
.threadNoticeLink {}
.threadsType {}
.threadsDetails {}
.forumOnlineBar {}

a.threadPinnedLink:link {}
a.threadPinnedLink:visited {}
a.threadPinnedLink:hover {}
a.threadPinnedLink:active {}

a.threadLink:link {}
a.threadLink:visited {}
a.threadLink:hover {}
a.threadLink:active {}

.postpSwithces {}
.thDescr {}
.threadFrmBlock {}
/* ------------------- */

/* forum Posts View */
.postTable {}
.postPoll {}
.postPoll td {border: 0 !important;}
.postFirst {border: 0 !important;}
.postRest1 {border: 0 !important;}
.postRest2 {border: 0 !important;}
.postSeparator {}

.postTdTop {}
.postBottom {}
.postBottom td {border: 0;padding: 0 5px !important;}
.postBottom img {vertical-align: middle;}
.postUser {}
.postTdInfo {text-align: center;}
.postRankName {}
.postRankIco {}
.reputation {}
.signatureHr {}
.posttdMessage {text-align: justify;padding: 8px !important;line-height: 18px;}

.pollQuestion {}
.pollButtons,.pollTotal {}
.pollSubmitBut,.pollreSultsBut {}
.pollSubmit {}
.pollEnd {}

.codeMessage {}
.quoteMessage {}

.signatureView {}
.edited {}
.editedBy {}

.statusBlock {}
.statusOnline {}
.statusOffline {}
/* ------------------ */

/* forum AllInOne Fast Add */
.newThreadBlock {}
.newPollBlock {}
.newThreadItem {}
.newPollItem {}
/* ----------------------- */

/* forum Post Form */
.pollBut, .loginButton, .searchSbmFl, .commSbmFl, .signButton {}

.codeButtons {}
.codeCloseAll {}
.postNameFl,.postDescrFl {}
.postPollFl,.postQuestionFl {}
.postResultFl {}
.postAnswerFl {}
.postTextFl {}
.postUserFl {}

.pollHelp {}
.smilesPart td {border: 0 !important;}
/* ----------------- */
/* ====== forum End ====== */

/*--------------------- INPUTS start ---------------------*/
input[type=submit], input[type=reset], input[type=button] {
padding: 0 6px;font: bold 10px/16px 'Century Gothic';color: #2d1f0b;border: 1px solid #756859;border-left: none;border-top: none;border-radius: 5px;background: url(/.s/t/786/17.jpg);cursor: pointer;
}
input[type=submit]:hover, input[type=reset]:hover, input[type=button]:hover {color: #000;border: 1px solid #756859;border-right: none;border-bottom: none;}
input[type=submit]:active, input[type=reset]:active, input[type=button]:active {}
input[type=text], input[type=password], textarea {
padding: 2px 3px; background: url(/.s/t/786/33.gif);border: none;border-radius: 5px;box-shadow: inset 0 1px 2px #4c4c4c;font-size: 11px;
}
textarea {}
select {font-size: 11px;border: 1px solid #ccc;padding: 2px 3px;}
#mchatBtn, input.codeButtons, input.button {padding-left: 0;padding-right: 0;}
.block #secuCodeMc3 {_width: 50px !important /*FOR IE*/;}
.queryField {width: auto !important;}
.commFl {width: 100%;}
#frM58 span {display: inline-block;}
input, select, label {vertical-align: middle;}
/*--------------------- INPUTS end ---------------------*/

/*--------------------- POPUP start ---------------------*/
.popup {background: url(/.s/t/786/34.png) repeat-x;padding: 13px 10px 10px 10px;}
.popup a {color: #362316;font-weight: bold;}
.popuptitle {font: bold 16px 'Century Gothic';color: #fffbd6;text-align: left;text-transform: uppercase;text-shadow: 0 1px 1px #000;padding: 4px 0 2px 40px;}
.popupbody {text-align: left;}
.hrz {height: 2px;background: url(/.s/t/786/35.png);overflow: hidden;margin: 5px 0;}
.vrt {background: url(/.s/t/786/36.png) repeat-y;}
.pb-left {padding-left: 7px;}
.pb-right {padding-right: 7px;background-position: top right;}
.pb-inside {background: url(/.s/t/786/29.jpg);padding: 10px 20px; _width: 100% /*FOR IE*/;border-radius: 8px;color: #362316;}
.pb-inside td {color: #362316;}
/*--------------------- POPUP end ---------------------*/

/* scriptfor.ucoz.net ScRipTiX */ 
.catPages1 { 
padding: 3px; 
margin: 3px; 
text-align:center; 
color:#ff6500; 
font-size:80%; 
} 
.catPages1 a:link, 
.catPages1 a:visited, 
.catPages1 a:active{ 
border: 1px solid #ff9600; 
margin-right:3px; 
padding:5px 7px; 

background-image:url(http://i011.radikal.ru/0907/0b/295af489e44a.jpg); 
background-position:bottom; 
text-decoration: none; 
color: #ff6500; } 

.catPages1 b {margin-right:3px; 
padding:5px 7px; 
border: 1px solid #ff6500; 

font-weight: bold; 
background-color: #ffbe94; 
color: #ff6500;} 

.catPages1 a:hover {border: 1px solid #ff9600; 
background-image:none; 
background-color:#ffc794; 
color: #ff6500;} 
/* scriptfor.ucoz.net ScRipTiX */
/**
 * glossy.js 1.51 (21-Mar-2009)
 * (c) by Christian Effenberger 
 * All Rights Reserved
 * Source: glossy.netzgesta.de
 * Distributed under Netzgestade Software License Agreement
 * http://www.netzgesta.de/cvi/LICENSE.txt
 * License permits free of charge
 * use on non-commercial and 
 * private web sites only 
**/

var tmp = navigator.appName == 'Microsoft Internet Explorer' && navigator.userAgent.indexOf('Opera') < 1 ? 1 : 0;
if(tmp) var isIE = document.namespaces ? 1 : 0;

if(isIE) {
 if(document.namespaces['v']==null) {
 var e=["shape","shapetype","group","background","path","formulas","handles","fill","stroke","shadow","textbox","textpath","imagedata","line","polyline","curve","roundrect","oval","rect","arc","image"],s=document.createStyleSheet(); 
 for(var i=0; i<e.length; i++) {s.addRule("v\\:"+e[i],"behavior: url(#default#VML);");} document.namespaces.add("v","urn:schemas-microsoft-com:vml");
 } 
}

function getImages(className){
 var children = document.getElementsByTagName('img'); 
 var elements = new Array(); var i = 0;
 var child; var classNames; var j = 0;
 for (i=0;i<children.length;i++) {
 child = children[i];
 classNames = child.className.split(' ');
 for (var j = 0; j < classNames.length; j++) {
 if (classNames[j] == className) {
 elements.push(child);
 break;
 }
 }
 }
 return elements;
}

function getClasses(classes,string){
 var temp = '';
 for (var j=0;j<classes.length;j++) {
 if (classes[j] != string) {
 if (temp) {
 temp += ' '
 }
 temp += classes[j];
 }
 }
 return temp;
}

function getClassValue(classes,string){
 var temp = 0; var pos = string.length;
 for (var j=0;j<classes.length;j++) {
 if (classes[j].indexOf(string) == 0) {
 temp = Math.min(classes[j].substring(pos),100);
 break;
 }
 }
 return Math.max(0,temp);
}

function getClassColor(classes,string){
 var temp = 0; var str = ''; var pos = string.length;
 for (var j=0;j<classes.length;j++) {
 if (classes[j].indexOf(string) == 0) {
 temp = classes[j].substring(pos);
 str = '#' + temp.toLowerCase();
 break;
 }
 }
 if(str.match(/^#[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]$/i)) {
 return str;
 }else {
 return 0;
 }
}

function getClassAttribute(classes,string){
 var temp = 0; var pos = string.length;
 for (var j=0;j<classes.length;j++) {
 if (classes[j].indexOf(string) == 0) {
 temp = 1; break;
 }
 }
 return temp;
}

function roundedRect(ctx,x,y,width,height,radius,nopath){
 if (!nopath) ctx.beginPath();
 ctx.moveTo(x,y+radius);
 ctx.lineTo(x,y+height-radius);
 ctx.quadraticCurveTo(x,y+height,x+radius,y+height);
 ctx.lineTo(x+width-radius,y+height);
 ctx.quadraticCurveTo(x+width,y+height,x+width,y+height-radius);
 ctx.lineTo(x+width,y+radius);
 ctx.quadraticCurveTo(x+width,y,x+width-radius,y);
 ctx.lineTo(x+radius,y);
 ctx.quadraticCurveTo(x,y,x,y+radius);
 if (!nopath) ctx.closePath();
}

function addRadialStyle(ctx,x1,y1,r1,x2,y2,r2,opacity) {
 var tmp = ctx.createRadialGradient(x1,y1,r1,x2,y2,r2);
 var opt = Math.min(parseFloat(opacity+0.1),1.0);
 tmp.addColorStop(0,'rgba(0,0,0,'+opt+')');
 tmp.addColorStop(0.25,'rgba(0,0,0,'+opacity+')');
 tmp.addColorStop(1,'rgba(0,0,0,0)');
 return tmp;
}

function addLinearStyle(ctx,x,y,w,h,opacity) {
 var tmp = ctx.createLinearGradient(x,y,w,h);
 var opt = Math.min(parseFloat(opacity+0.1),1.0);
 tmp.addColorStop(0,'rgba(0,0,0,'+opt+')');
 tmp.addColorStop(0.25,'rgba(0,0,0,'+opacity+')');
 tmp.addColorStop(1,'rgba(0,0,0,0)');
 return tmp;
}

function addBright(ctx,x,y,width,height,radius,opacity) {
 var style = ctx.createLinearGradient(0,y,0,y+height);
 style.addColorStop(0,'rgba(254,254,254,'+opacity+')');
 style.addColorStop(1,'rgba(254,254,254,0.1)');
 ctx.beginPath();
 ctx.moveTo(x,y+radius);
 ctx.lineTo(x,y+height-radius);
 ctx.quadraticCurveTo(x,y+height,x+radius,y+height);
 ctx.lineTo(x+width-radius,y+height);
 ctx.quadraticCurveTo(x+width,y+height,x+width,y+height-radius);
 ctx.lineTo(x+width,y+radius);
 ctx.quadraticCurveTo(x+width,y,x+width-radius,y);
 ctx.lineTo(x+radius,y);
 ctx.quadraticCurveTo(x,y,x,y+radius);
 ctx.closePath();
 ctx.fillStyle = style;
 ctx.fill();
}

function addDark(ctx,x,y,width,height,radius,opacity) {
 var style = ctx.createLinearGradient(0,y,0,y+height);
 style.addColorStop(0,'rgba(0,0,0,0)');
 style.addColorStop(1,'rgba(0,0,0,'+opacity+')');
 ctx.beginPath();
 ctx.moveTo(x,y);
 ctx.lineTo(x,y+height-radius);
 ctx.quadraticCurveTo(x,y+height,x+radius,y+height);
 ctx.lineTo(x+width-radius,y+height);
 ctx.quadraticCurveTo(x+width,y+height,x+width,y+height-radius);
 ctx.lineTo(x+width,y);
 ctx.lineTo(x,y);
 ctx.closePath();
 ctx.fillStyle = style;
 ctx.fill();
}

function addFrame(ctx,x,y,width,height,radius,opacity) {
 roundedRect(ctx,x,y,width,height,radius);
 var style = ctx.createLinearGradient(0,0,0,height);
 style.addColorStop(0,'rgba(254,254,254,'+opacity+')');
 style.addColorStop(1,'rgba(0,0,0,'+opacity+')');
 ctx.lineWidth = (radius+x)/2;
 ctx.strokeStyle = style;
 ctx.stroke();
}

function glossyShadow(ctx,x,y,width,height,radius,opacity){
 var style; var os = radius/2;
 ctx.beginPath();
 ctx.rect(x+radius,y,width-(radius*2),y+os);
 ctx.closePath();
 style = addLinearStyle(ctx,x+radius,y+os,x+radius,y,opacity);
 ctx.fillStyle = style;
 ctx.fill();
 ctx.beginPath();
 ctx.rect(x,y,radius,radius);
 ctx.closePath();
 style = addRadialStyle(ctx,x+radius,y+radius,radius-os,x+radius,y+radius,radius,opacity);
 ctx.fillStyle = style;
 ctx.fill();
 ctx.beginPath();
 ctx.rect(x,y+radius,os,height-(radius*2));
 ctx.closePath();
 style = addLinearStyle(ctx,x+os,y+radius,x,y+radius,opacity);
 ctx.fillStyle = style;
 ctx.fill();
 ctx.beginPath();
 ctx.rect(x,y+height-radius,radius,radius);
 ctx.closePath();
 style = addRadialStyle(ctx,x+radius,y+height-radius,radius-os,x+radius,y+height-radius,radius,opacity);
 ctx.fillStyle = style;
 ctx.fill();
 ctx.beginPath();
 ctx.rect(x+radius,y+height-os,width-(radius*2),os);
 ctx.closePath();
 style = addLinearStyle(ctx,x+radius,y+height-os,x+radius,y+height,opacity);
 ctx.fillStyle = style;
 ctx.fill();
 ctx.beginPath(); 
 ctx.rect(x+width-radius,y+height-radius,radius,radius);
 ctx.closePath();
 style = addRadialStyle(ctx,x+width-radius,y+height-radius,radius-os,x+width-radius,y+height-radius,radius,opacity);
 ctx.fillStyle = style;
 ctx.fill();
 ctx.beginPath();
 ctx.rect(x+width-os,y+radius,os,height-(radius*2));
 ctx.closePath();
 style = addLinearStyle(ctx,x+width-os,y+radius,x+width,y+radius,opacity);
 ctx.fillStyle = style;
 ctx.fill();
 ctx.beginPath();
 ctx.rect(x+width-radius,y,radius,radius);
 ctx.closePath();
 style = addRadialStyle(ctx,x+width-radius,y+radius,radius-os,x+width-radius,y+radius,radius,opacity);
 ctx.fillStyle = style;
 ctx.fill();
}

function addIEGlossy() {
 var theimages = getImages('glossy');
 var image; var object; var canvas; var context; var i;
 var iradius = null; var sradius = null; var noshadow = 0;
 var ibgcolor = null; var igradient = null; var horizontal = 0;
 var factor = 0.25; var classes = ''; var newClasses = ''; 
 var maxdim = null; var inset = 0; var offset = 0; var style = '';
 var width = 0; var height = 0; var vml = null; var flt = null;
 var display = null; var xradius = null; var angle;
 var head; var foot; var fill; var shade; var tmp;
 for(i=0;i<theimages.length;i++) { 
 image = theimages[i]; object = image.parentNode; 
 head = ''; foot = ''; fill = ''; shade = ''; tmp = '';
 if(image.width>=16 && image.height>=16) {
 classes = image.className.split(' '); 
 horizontal = 0; igradient = 0; factor = 0.25;
 noshadow = 0; iradius = 0; ibgcolor = 0;
 iradius = getClassValue(classes,"iradius");
 ibgcolor = getClassColor(classes,"ibgcolor");
 igradient = getClassColor(classes,"igradient");
 noshadow = getClassAttribute(classes,"noshadow");
 horizontal = getClassAttribute(classes,"horizontal");
 newClasses = getClasses(classes,"glossy");
 width = image.width; height = image.height;
 maxdim = Math.min(width,height)/2; angle = 0;
 factor = iradius>0?Math.min(Math.max(iradius,20),50)/100:factor;
 iradius = Math.round(45*factor);
 xradius = Math.round(Math.max(Math.round(maxdim*factor),4)/4)*4;
 if(noshadow<1) {
 offset = xradius/4; sradius = iradius*0.75;
 inset = offset; radius = sradius; sradius = radius*0.75;
 shade = '<v:roundrect arcsize="' + radius + '%" strokeweight="0" filled="t" stroked="f" fillcolor="#000000" style="filter:Alpha(opacity=60), progid:dxImageTransform.Microsoft.Blur(PixelRadius=' + inset + ', MakeShadow=false); zoom:1;margin:-1px 0 0 -1px;padding: 0;display:block;position:absolute;top:' + inset + 'px;left:0px;width:' + (width-(2*inset)) + 'px;height:' + (height-(3*inset)) + 'px;"><v:fill color="#000000" opacity="1" /></v:roundrect>';
 tmp = '<v:rect strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="zoom:1;margin:-1px 0 0 -1px;padding: 0;display:block;position:absolute;top:0px;left:0px;width:' + width + 'px;height:' + height + 'px;"><v:fill color="#ffffff" opacity="0.0" /></v:rect>';
 }else {
 radius = iradius; inset = 0; 
 offset = xradius/4; sradius = iradius*0.75;
 }
 if(isNaN(ibgcolor)) {
 fill = '<v:roundrect arcsize="' + radius + '%" strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="zoom:1;margin:-1px 0 0 -1px;padding: 0;display:block;position:absolute;top:0px;left:' + inset + 'px;width:' + (width-(2*inset)) + 'px;height:' + (height-(2*inset)) + 'px;">';
 if(isNaN(igradient)) {
 if(horizontal>0) angle = 90;
 fill = fill + '<v:fill method="sigma" type="gradient" angle="' + angle + '" color="' + igradient + '" color2="' + ibgcolor + '" /></v:roundrect>';
 }else {
 fill = fill + '<v:fill color="' + ibgcolor + '" /></v:roundrect>';
 }
 }
 display = (image.currentStyle.display.toLowerCase()=='block')?'block':'inline-block';
 vml = document.createElement(['<var style="zoom:1;overflow:hidden;display:' + display + ';width:' + width + 'px;height:' + height + 'px;padding:0;">'].join(''));
 flt = image.currentStyle.styleFloat.toLowerCase();
 display = (flt=='left'||flt=='right')?'inline':display;
 head = '<v:group style="zoom:1; display:' + display + '; margin:-1px 0 0 -1px; padding:0; position:relative; width:' + width + 'px;height:' + height + 'px;" coordsize="' + width + ',' + height + '">' + tmp;
 foot = '<v:roundrect arcsize="' + radius + '%" strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="zoom:1;margin:-1px 0 0 -1px;padding: 0;display:block;position:absolute;top:0px;left:' + inset + 'px;width:' + (width-(2*inset)) + 'px;height:' + (height-(2*inset)) + 'px;"><v:fill src="' + image.src + '" type="frame" /></v:roundrect><v:roundrect arcsize="' + (sradius*2) + '%" strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="zoom:1;margin:-1px 0 0 -1px;padding: 0;display: block;position:absolute;top:' + offset + 'px;left:' + (offset+inset) + 'px;width:' + (width-(2*offset)-(2*inset)) + 'px;height:' + ((height/2)-offset-inset) + 'px;"><v:fill method="linear" type="gradient" angle="0" color="#ffffff" opacity="0.1" color2="#ffffff" o:opacity2="0.75" /></v:roundrect><v:roundrect arcsize="' + (radius*2) + '%" strokeweight="0" filled="t" stroked="f" fillcolor="#000000" style="zoom:1;margin:-1px 0 0 -1px;padding: 0;display: block;position:absolute;top:' + ((height/2)-inset) + 'px;left:' + inset + 'px;width:' + (width-(2*inset)) + 'px;height:' + ((height/2)-inset) + 'px;"><v:fill method="sigma" type="gradient" angle="180" color="#000000" opacity="0.0" color2="#000000" o:opacity2="0.5" /></v:roundrect></v:group>';
 vml.innerHTML = head + shade + fill + foot;
 vml.className = newClasses;
 vml.style.cssText = image.style.cssText;
 vml.style.visibility = 'visible';
 vml.src = image.src; vml.alt = image.alt;
 vml.width = image.width; vml.height = image.height;
 if(image.id!='') vml.id = image.id;
 if(image.title!='') vml.title = image.title;
 if(image.getAttribute('onclick')!='') vml.setAttribute('onclick',image.getAttribute('onclick'));
 object.replaceChild(vml,image);
 }
 }
}

function addGlossy() {
 var theimages = getImages('glossy');
 var image; var object; var canvas; var context; var i, radius;
 var iradius = null; var sradius = null; var noshadow = 0;
 var ibgcolor = null; var igradient = null; var horizontal = 0;
 var factor = 0.25; var classes = ''; var newClasses = ''; 
 var maxdim = null; var inset = 0; var offset = 0; var style = '';
 for(i=0;i<theimages.length;i++) { 
 image = theimages[i]; object = image.parentNode; 
 canvas = document.createElement('canvas');
 if(canvas.getContext && image.width>=16 && image.height>=16) {
 classes = image.className.split(' '); 
 horizontal = 0; igradient = 0; factor = 0.25;
 noshadow = 0; iradius = 0; ibgcolor = 0;
 iradius = getClassValue(classes,"iradius");
 ibgcolor = getClassColor(classes,"ibgcolor");
 igradient = getClassColor(classes,"igradient");
 noshadow = getClassAttribute(classes,"noshadow");
 horizontal = getClassAttribute(classes,"horizontal");
 newClasses = getClasses(classes,"glossy");
 canvas.className = newClasses;
 canvas.style.cssText = image.style.cssText;
 canvas.style.height = image.height+'px';
 canvas.style.width = image.width+'px';
 canvas.height = image.height;
 canvas.width = image.width;
 canvas.src = image.src; canvas.alt = image.alt;
 if(image.id!='') canvas.id = image.id;
 if(image.title!='') canvas.title = image.title;
 if(image.getAttribute('onclick')!='') canvas.setAttribute('onclick',image.getAttribute('onclick'));
 maxdim = Math.min(canvas.width,canvas.height)/2;
 factor = iradius>0?Math.min(Math.max(iradius,20),50)/100:factor;
 iradius = Math.max(Math.round(maxdim*factor),4);
 if(noshadow<1) {
 iradius = Math.round(iradius/4)*4;
 offset = iradius/4; sradius = iradius*0.75;
 inset = offset; radius = sradius; sradius = radius*0.75;
 }else {
 radius = iradius; inset = 0;
 offset = iradius/4; sradius = iradius*0.75;
 }
 context = canvas.getContext("2d");
 object.replaceChild(canvas,image);
 context.clearRect(0,0,canvas.width,canvas.height);
 if(noshadow<1) glossyShadow(context,0,0,canvas.width,canvas.height,iradius,0.5);
 context.save();
 if(!isNaN(ibgcolor)&&window.opera) {
 context.globalCompositeOperation = "destination-out";
 context.save();
 roundedRect(context,inset,0,canvas.width-(inset*2),canvas.height-(inset*2),radius);
 context.fillStyle='rgba(0,0,0,1)'; context.fill(); context.clip(); 
 context.clearRect(0,0,canvas.width,canvas.height);
 context.restore();
 roundedRect(context,inset,0,canvas.width-(inset*2),canvas.height-(inset*2),radius);
 context.clip(); context.globalCompositeOperation = "source-over";
 }else {
 roundedRect(context,inset,0,canvas.width-(inset*2),canvas.height-(inset*2),radius);
 context.clip();
 }
 if(isNaN(ibgcolor)) {
 if(isNaN(igradient)) {
 if(horizontal>0) {
 style = context.createLinearGradient(0,0,canvas.width,0);
 }else {
 style = context.createLinearGradient(0,0,0,canvas.height-(inset*2));
 }
 style.addColorStop(0,ibgcolor); 
 style.addColorStop(1,igradient);
 context.beginPath();
 context.rect(0,0,canvas.width,canvas.height-(inset*2));
 context.closePath();
 context.fillStyle = style;
 context.fill();
 }else {
 context.fillStyle = ibgcolor;
 context.fillRect(0,0,canvas.width,canvas.height-(inset*2));
 }
 }else {
 context.clearRect(0,0,canvas.width,canvas.height);
 }
 context.drawImage(image,inset,0,canvas.width-(inset*2),canvas.height-(inset*2));
 addBright(context,offset+inset,offset,canvas.width-(2*(offset+inset)),(canvas.height/2)-offset,sradius,0.75);
 addDark(context,inset,(canvas.height/2)-inset,canvas.width-(2*inset),(canvas.height/2)-inset,sradius,0.5);
 addFrame(context,inset,0,canvas.width-(inset*2),canvas.height-(inset*2),radius,0.25)
 canvas.style.visibility = 'visible';
 }
 }
}

var glossyOnload = window.onload;
window.onload = function () { if(glossyOnload) glossyOnload(); if(isIE){addIEGlossy(); }else {addGlossy();}}