var go = true;
if (document.location.toString().indexOf('?refreshme=true')!=-1) {
SetCookie('refreshed','true');
go=false;
document.location=document.location.toString().split('?')[0];
}
if (GetCookie('refreshed')=='true' && go) {
SetCookie('refreshed','false');
document.location.reload();
}

var moretxtvalue='';
var nRec = 0;
var related = new Array();
var CurrItemId='addcook';
var ie = false;
var ns6 = false;
var ns = false;
var opera = false;

if (eval(document.layers)) { ns=true; }
else {
    if (eval(document.all)) { ie=true; if (navigator.userAgent.indexOf('Opera')!=-1) opera=true;}
        else {
            if (eval(document.getElementById)) { ns6=true;}
            }
    }


//finds and return <DIV> object by given name

function Layer(layerName) {
return (ns)?(document.layers[layerName]):((ns6)?(document.getElementById(layerName)):(document.all(layerName)));
}

function enlarge(url,imgw,imgh) {
    var leftPos = 235;
    var topPos = 233;
imgw=eval(imgw)+20; if (imgw > 800) imgw = 800;
imgh=eval(imgh)+30; if (imgh > 600) imgh = 600;
window.open(url, 'EnlargePicture','width='+imgw+',height='+imgh+',scrollbars=no,resizable=no,statusbar=no,location=no,titlebar=0,top=' + topPos + ',left=' + leftPos);
}

function retriveimages(arrname) {
return eval(arrname);
}

function makeavailable(num,state) {
    obj=eval("document.forms.multiorder.vwquantity"+num)
    obj.disabled=!state;
    ((state)?(obj.value=1):(obj.value=0))
    obj2=eval("document.forms.multiorder.vwitem"+num)
    obj2.disabled=!state;
    ((state)?(obj.value=1):(obj.value=0))

for(i=0;i<document.forms.multiorder.elements.length; i++){
obj3 = document.forms.multiorder.elements[i];

	if(obj3.name.indexOf('vwattr'+num)!=-1){
		    obj3.disabled=!state;
    ((state)?(obj.value=1):(obj.value=0))
	}

}
	
	//alert(document.forms.multiorder.elements.length)
	
}

function showImage(imgUrl){

var imgWin = new Object();

   var wer = Math.random();
  wer = wer*10000;
  wer = Math.round(wer); 
  
  var name = 'nm' + wer;

imgWin=window.open('http://site.modernfurnituredecor.com/imageShow.html?'+imgUrl,name,'height=500,width=468,status=0,statusbar=0,toolbar=0,menubar=0,location=no,resizable=yes,scrollbars=no');

}



function showImage1(){
    var leftPos = 5;
    var topPos = 5;
var imgWin = new Object();

   var wer = Math.random();
  wer = wer*10000;
  wer = Math.round(wer); 
  
  var name = 'nm' + wer;

    imgWin = window.open('imageShow1.html', name,'height=600,width=800,status=0,statusbar=0,toolbar=0,menubar=0,location=no,resizable=yes,scrollbars=no,top=' + topPos + ',left=' + leftPos);
    imgWin.document.write('<html><head><title></title><link href=http://site.modernfurnituredecor.com/main.css rel="stylesheet" type="text/css"><script src="http://site.modernfurnituredecor.com/img.js" language="JavaScript" type="text/javascript"></script></head><body bgcolor="#ffffff" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0"><table cellpadding=0 cellspacing=0 border=0 width="100%"><tr><td height="40" align="center" class="sth0 fs14 bd"><center><a href="javascript:showPrev()" class="href0">< Prev</a> | <a href="javascript:showNext()" class="href0">Next ></a></center></td></tr></table><div style="width:800px;height:560px;border:1px solid #cccccc;overflow:scroll;"><table cellpadding=0 cellspacing=0 border=0 width="700"><tr><td height="540" align="center">'+divVar+'</td></tr></table></div></body></html>');



}
function maillist(emailval) {
var NewP = new Object();
NewP=window.open('http://site.modernfurnituredecor.com/custom/addemail.php?mail='+emailval,'popupemail','HEIGHT=150,WIDTH=520,scrollbars=yes,resizable=yes,top=50,left=50');
NewP.window.focus();
}

