var styleFactor= new Array(0,0.09044,0.09044,0.09744,0.09744,0.09744,0.09744,0.10654,0.10654,0.10934,0.10934,0.10934,0.10794,0.10794,0.10794,0.10794,0.10794,0.10794,0.10794,0.10374,0.10374,0.10374,0.10374,0.10374,0.11214,0.11214,0.11494,0.12194,0.12194,0.12194,0.12194,0.12194,0.13594,0.13594,0.13594,0.14154,0.14154,0.16814,0.16814,0.19194,0.21294);
 
var styleFactor1= new Array(0,68.81,68.81,73.01,73.01,73.01,73.01,73.01,73.01,74.41,74.41,74.41,75.81,75.81,75.81,75.81,75.81,75.81,75.81,77.21,77.21,77.21,77.21,77.21,78.61,78.61,84.21,81.41,81.41,81.41,84.21,84.21,92.61,92.61,92.61,96.81,96.81,113.61,113.61,124.81,145.81);


var styleName= new Array("NONE","Soho Oak","Soho Walnut","Euro Cedar","Euro Mahogany","Euro Russet","Euro Black","Ebony Noir","Ebony Maroon","Slim Black","Slim Gold","Slim Silver","Chic White","Chic Smoke","Chic Gold","Chic Black&Gold","Chic Black&Silver","Galaxy Silver","Galaxy Gold","Vienna Oak","Vienna Mahogany","Vienna Walnut","Antique Gold","Antique Oak","Voodoo Oak","Voodoo Honey","Samba Olive","Monaco Gold","Monaco Silver","Monaco Rust","Oriental Moon","Oriental Sun","Antique Green","Antique Smoke","Antique Rust","Louvre Silver","Louvre Gold","Regency Smoke","Regency Gold","Versailles Gold","Versailles Brass");
 
var detailText=new Array("None selected","Solid timber, contemporary look 1.75 inches wide 0.75 deep, sober smooth oak finish","Solid timber, contemporary look 1.75 inches wide 0.75 deep, sober smooth walnut finish","Solid timber, classic look 2 inches wide 0.75 deep, refined shaded cedar finish","Solid timber, classic look 2 inches wide 0.75 deep, refined shaded mahogany finish","Solid timber, classic look 2 inches wide 0.75 deep, gorgeous walnut finish with veneers of gold","Solid timber, classic look 2 inches wide 0.75 deep, sober smooth satin black finish","Solid timber, modern look 1.75 inches wide 0.75 deep, elegant smooth satin black finish","Solid timber, modern look 1.75 inches wide 0.75 deep, beautiful grainy walnut finish","Solid timber, gallery look  0.75 inches wide 1.25 deep, trendy smooth satin black finish","Solid timber, gallery look  0.75 inches wide 1.25 deep, trendy polished metallic-gold finish on the front, matte black on the sides","Solid timber, gallery look  0.75 inches wide 1.25 deep, trendy polished metallic-silver finish on the front, matte black on the sides","Solid timber, contemporary look 1.75 inches wide 0.75 deep, smooth white with gorgeous gold line accent","Solid timber, contemporary look 1.75 inches wide 0.75 deep, striking textured silver with black line front and smooth satin black sides","Solid timber, contemporary look 1.75 inches wide 0.75 deep, striking textured gold with black line front and smooth satin black sides","Solid timber, contemporary look 1.75 inches wide 0.75 deep, smooth satin black with refined gold line accent","Solid timber, contemporary look 1.75 inches wide 0.75 deep, smooth satin black with refined silver line accent","Solid timber, contemporary look 1.75 inches wide 0.75 deep, elegant texture in black and silver front with black sides","Solid timber, contemporary look 1.75 inches wide 0.75 deep, lovely gold patina with textured effect and golden sides","Solid timber, classic look 2.75 inches wide 1.25 deep, classy shaded oak finish","Solid timber, classic look 2.75 inches wide 1.25 deep, classy shaded mahogany finish","Solid timber, classic look 2.75 inches wide 1.25 deep, classy grainy shaded walnut finish","Solid timber, vintage look 3.25 inches wide 0.75 deep, beautiful mahogany finish with gold accents","Solid timber, vintage look 3.25 inches wide 0.75 deep, extraordinary shaded oak finish","Solid timber, classical look 2.75 inches wide 0.75 deep, elegant shaded oak finish","Solid timber, classical look 2.75 inches wide 0.75 deep, elegant shaded English walnut finish","Solid timber, modern look 2.75 inches wide 0.75 deep, sober grainy black olive finish","Solid timber, contemporary look 1.75 inches wide 1.25 deep, trendy textured smoke-gold on the front and satin black on the side","Solid timber, contemporary look 1.75 inches wide 1.25 deep, trendy textured smoke-silver on the front and satin black on the side","Solid timber, contemporary look 1.75 inches wide 1.25 deep, trendy textured gold and rust on the front, satin black on the side","Solid timber, contemporary look 2.25 inches wide 0.75 deep, polished metallic-silver with lovely ageing touches","Solid timber, contemporary look 2.25 inches wide 0.75 deep, polished metallic-gold with lovely ageing touches","Solid timber, classic look 2.75 inches wide 1.25 deep, textured combination of green-bronze rust and gold with a classy border in rusted gold on the front and sides in satin black","Solid timber, classic look 2.75 inches wide 1.25 deep, textured metallic-steel grey with a border in rusted gold and sides in satin black","Solid timber, classic look 2.75 inches wide 1.25 deep, textured combination of rust and gold with a classy border in rusted gold and sides in satin black","Solid timber, antique look 3 inches wide 1.25 deep, refined metallic-silver finish with elegant touches of ageing","Solid timber, antique look 3 inches wide 1.25 deep, refined metallic-gold finish with elegant touches of ageing","Solid timber, contemporary look 2.5 inches wide 1.25 deep, sober gray smoked texture and trendy silver line on the front, satin black on sides","Solid timber, contemporary look 2.5 inches wide 1.25 deep, trendy gold-black texture with lovely gold line on the front, satin black on sides","Solid timber, vintage look 2.5 inches wide 1.5 deep, superb classic ornate in yellow-gold","Solid timber, vintage look 2.5 inches wide 1.5 deep, outstanding classic ornate in brass-gold with attractive accents of black");

var setUrl=new Array("frame_module.php","oil_paintings.php");
function submitTo(form,v)
{
form.action=setUrl[v];
form.submit();
}

function setStrings()
{
var strg1=nombre.split("Buy");

document.getElementById('nom').innerText=strg1[1];
document.getElementById('nom1').innerText=strg1[1];
nombre=strg1[1];

var strg2=image.split("src=");
var strg3=strg2[1].split("ALT=");
var strg4=strg3[0].split('"');

document.getElementById('imagefile').src=strg4[1];
imageSrc=strg4[1];

if (artista.indexOf("by ") !=-1)
{
var strg5=artista.split("by ");
var strg6=strg5[1].split("<",2);
document.getElementById('art').innerText=strg6[0];
document.getElementById('art1').innerText=strg6[0];
artista=strg6[0]; 

}
else {
document.getElementById('art').innerText="unknown";
document.getElementById('art1').innerText="unknown";
artista="unknown";
}
}

function setimagesize()
{
var chunk=image.split('"');
Iw=chunk[5];
Ih=chunk[7];

r=(Iw/Ih);
if (r>=1)
{
ancho=Mw; alto=parseInt(Mw/r);
setframesize();
}
else
{
ancho=parseInt(Mh*r); alto=Mh;
setframesize();
}
}
function setframesize()
{
c_right=ancho;
c_bottom=alto;
document.getElementById('frame_t').style.width=ancho;
document.getElementById('imagefile').style.width=ancho;
document.getElementById('imagefile').style.height=alto;
document.getElementById('frame_c').style.width=ancho;
document.getElementById('frame_c').style.height=alto;
}

function checkAlert(){
if (frameStatus==0){
alert("Frame option is not checked, please check it before selecting the frame style");
}}

function changeStyle(s) {
s1=s;
document.images.frame_ti.src= 'images/frames/frame_'+s+'_ti.jpg';

document.getElementById('frame_t').style.backgroundImage ='url(images/frames/frame_'+s+'_t.jpg)';

document.images.frame_td.src='images/frames/frame_'+s+'_td.jpg';

document.getElementById('frame_ci').style.backgroundImage =  'url(images/frames/frame_'+s+'_ci.jpg)';

document.getElementById('frame_cd').style.backgroundImage =  'url(images/frames/frame_'+s+'_cd.jpg)';

document.images.frame_fi.src='images/frames/frame_'+s+'_fi.jpg';

document.getElementById('frame_f').style.backgroundImage =  'url(images/frames/frame_'+s+'_f.jpg)';

document.images.frame_fd.src='images/frames/frame_'+s+'_fd.jpg';

document.images.detail.src='images/frames/frame_detail_'+s+'.gif';

document.getElementById('selectedstyle').innerText='Frame style #'+s+': '+styleName[s];

document.getElementById('detailDescript').innerText="Style #"+s+": "+styleName[s]+" - Specs: "+detailText[s];
document.form_5.style.value=s;

if (s!=0){
calcPrice();
}
}

function bcolor(bcol)
{
document.getElementById('td3').bgColor=bcol;
}