// JavaScript Document
function getStyle(el, style) {
if(!document.getElementById) return;
var value = el.style[toCamelCase(style)];
if(!value)
if(document.defaultView)
value = document.defaultView.
getComputedStyle(el, "").getPropertyValue(style);
else if(el.currentStyle) value = el.currentStyle[toCamelCase(style)];
return value;}

function setStyle(objId, style, value){
document.getElementById(objId).style[style] = value;
}

function toCamelCase( sInput ) {
var oStringList = sInput.split('-');
if(oStringList.length == 1)   return oStringList[0];
var ret = sInput.indexOf("-") == 0 ? 
       oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1) : oStringList[0];
for(var i = 1, len = oStringList.length; i < len; i++){
    var s = oStringList[i];
    ret += s.charAt(0).toUpperCase() + s.substring(1)
}
return ret;}

var wThumbs = 248;
var wCorrect=16;
var units="px"; // or %, pt, em, ....
var DivMain="main"; //name of a div tag that included a all DivName tags. It can be "body" :)! 
var DivName="content"; // name of a div tag that included a thumbs. It must have  a name as name1, name2, name3...
//increaseWidth(itm) - number of a div tags. if there a three tags (name1, name2, name3) then it will be - 3...
function increaseWidth(itm){
var theDiv = document.getElementById(DivMain);
if (document.body) {
var w=document.body.clientWidth;}
else if(
document.documentElement && document.documentElement.clientWidth){var w=document.documentElement.clientWidth;}
else{
var w=parseInt(getStyle(theDiv, "width"));}
if(w%wThumbs){
var w2=((Math.floor(w/wThumbs)*wThumbs)+wCorrect)+units;
for(var i=0; i<itm; i++){
whichDiv=DivName+(itm-i);
setStyle(whichDiv, "width", w2);}}
//document.fi.info.value=Math.floor(w/wThumbs)*wThumbs;
}