
//Animated Window Opener script-By Website Abstraction (www.wsabstract.com) More scripts here-->
var mylocation="../index.html"
var winheight=100
var winsize=100
var x=5

function go(){
	win2=window.open("","","scrollbars")
	if (!document.layers&&!document.all){
		win2.location=mylocation
	return
	}

	win2.resizeTo(100,100)
	win2.moveTo(0,0)
	go2()
}

function go2(){
	if (winheight>=screen.availHeight-3)
		x=0
	win2.resizeBy(5,x)
	winheight+=5
	winsize+=5
	if (winsize>=screen.width-5){
		win2.location=mylocation
		winheight=100
		winsize=100
		x=5
		return
	}
	setTimeout("go2()",50)
}

function displayImage(imgURL, imgName, widthSize, heightSize, urlLoc, price) {
	var selection;
	
	if (urlLoc.indexOf("GEO") == 0) 
		selection = "http://www.geocities.com/originalnlg/" + imgURL;
	//else if (urlLoc.indexOf("CQ") >= 0) 
		//selection = "http://www.cqcards.com/socialOuting/myOhMy/" + imgURL;
	else if (urlLoc.indexOf("myPic") == 0) 
		selection = imgURL;
	else
		selection = "../" + imgURL;
	//alert(selection);
	var winProperties = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,";
	winProperties = winProperties + "width=" + widthSize + ",height=" + heightSize;
	PreView = window.open("", "Preview", winProperties);
	PreView.document.open();
	PreView.document.write("<HTML><HEAD>");
	PreView.document.write("<TITLE>Preview</TITLE>");

	PreView.document.write("<script language=JavaScript>");
	PreView.document.write("function clickIE() { ");
	PreView.document.write("if (document.all) { return false; } }");
	PreView.document.write("function clickNS(e) {");
	PreView.document.write("if (document.layers||(document.getElementById&&!document.all)) {");
	PreView.document.write("if (e.which==2||e.which==3) { return false; }");
	PreView.document.write("} }");
	PreView.document.write("if (document.layers) {");
	PreView.document.write("document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;");
	PreView.document.write("} else{ document.onmouseup=clickNS; document.oncontextmenu=clickIE;");
	PreView.document.write("}");
	PreView.document.write("document.oncontextmenu=new Function('return false')");
	PreView.document.write("</script>");

	// START WITH the IMAGE!!!
	PreView.document.write("</HEAD><BODY BGCOLOR=000000 TEXT=silver marginwidth=0 marginheight=0 topmargin=0 leftmargin=0>");
	PreView.document.write("<TABLE BORDER=0 WIDTH=100%><tr><TD WIDTH=55%>&nbsp;<B><FONT SIZE=-1 FACE=COURIER>" + imgName + "</FONT></B></TD><TD WIDTH=45% ALIGN=right><FONT SIZE=2 FACE=Arial color=EE0000>Price:" + price + "&nbsp;</font> </TD>");
	PreView.document.write("</tr></table><HR><CENTER>");
	PreView.document.write("<FORM><IMG HSPACE=0 VSPACE=0 width=" + widthSize  + " SRC='" + selection + "'>");
	PreView.document.write("<INPUT TYPE='button' VALUE='Close' " + "onClick='window.close()'></FORM></CENTER>");
	PreView.document.write("</BODY></HTML>");
	PreView.document.close();
}

function displayImage2(imgURL, imgName, widthSize, heightSize, urlLoc) {
	var selection = "";
	if (urlLoc.indexOf("CQ") == 0)
		selection = "http://www.cqcards.com/socialOuting/myOhMy/" + imgURL;
	else if (urlLoc.indexOf("POD") == 0) 
		selection = "http://originalnlg.tripod.com/" + imgURL;
	else
		selection = "../" + imgURL;
	var winProperties = "toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,";
	winProperties = winProperties + "width=" + widthSize + ",height=" + heightSize;
	var PreView = window.open(selection, "Preview", winProperties);
}

function openIntro(theFile){
	var subWin = window.open(theFile,"subWin","width=575,height=520,scrollbars,resizable")
	subWin.creator=self
}

function openDecor(theFile){
	var subWin = window.open(theFile,"subWin","width=590,height=566,scrollbars,resizable,left=0,top=0")
	subWin.creator=self
}

function changeFurniture(theImg, pos, single) {
    document.imgPic0.src = '../../images/furniture/' + theImg;

    if(theImg.indexOf("diningContem") >= 0)
        st_img0.style.left = 27;
    else
        st_img0.style.left = 5;
    
}

function changeFurnitures(theCntrl) {
    if(theCntrl.value.length < 2)
        return;
    document.imgPic0.src = '../../images/furniture/' + theCntrl.value;

    if(theCntrl.value.indexOf("diningContem") >= 0 || theCntrl.value.indexOf("fire") >= 0)
        st_img0.style.left = 28;
    else if (theCntrl.value.indexOf("diningFrench") >= 0)
        st_img0.style.left = 57;
    else
        st_img0.style.left = 5;
}

var indx = 0;
function changePainting(style) {
    if(indx == paintings.length-1)
	   indx = 0;
	else
	   indx = indx + 1;
	
	var thePainting = paintings[indx].substring(0, paintings[indx].indexOf(","));
	var imgHeight = paintings[indx].substring(paintings[indx].indexOf(",")+1, paintings[indx].indexOf("=")-1);
	var divLeft = paintings[indx].substring(paintings[indx].indexOf("=")+1, paintings[indx].lastIndexOf(","));
	var divTop = paintings[indx].substring(paintings[indx].lastIndexOf(",")+1, paintings[indx].length);

    document.imgPic1.src = "../../artwork/" + thePainting;
    document.imgPic1.height = imgHeight;
    st_img1.style.left = divLeft;
    st_img1.style.top = divTop;
    st_img1.style.filter = "progid:DXImageTransform.Microsoft.Shadow(color=gray, direction=115, strength=8)";
}

function changePaintings(theCntrl) {
    var param = theCntrl.value;	
    if(param.length < 2)
        return;
	var thePainting = param.substring(0, param.indexOf(","));
	var imgHeight = param.substring(param.indexOf(",")+1, param.indexOf("=")-1);
	var divLeft = param.substring(param.indexOf("=")+1, param.lastIndexOf(","));
	var divTop = param.substring(param.lastIndexOf(",")+1, param.length);

    document.imgPic1.src = "../../artwork/" + thePainting;
    document.imgPic1.height = imgHeight;
    st_img1.style.left = divLeft;
    st_img1.style.top = divTop;
    st_img1.style.filter = "progid:DXImageTransform.Microsoft.Shadow(color=gray, direction=115, strength=8)";
}


function initPainting(numOfImg) {
    if(numOfImg == 1)
        st_img1.style.filter = "progid:DXImageTransform.Microsoft.Shadow(color=gray, direction=115, strength=8)";
    else if (numOfImg == 2) {
        st_img1.style.filter = "progid:DXImageTransform.Microsoft.Shadow(color=gray, direction=115, strength=8)";
        st_img2.style.filter = "progid:DXImageTransform.Microsoft.Shadow(color=gray, direction=115, strength=8)";
    } else if (numOfImg == 3) {
        st_img1.style.filter = "progid:DXImageTransform.Microsoft.Shadow(color=gray, direction=113, strength=7)";
        st_img2.style.filter = "progid:DXImageTransform.Microsoft.Shadow(color=gray, direction=113, strength=7)";
        st_img3.style.filter = "progid:DXImageTransform.Microsoft.Shadow(color=gray, direction=113, strength=7)";
    }
}
    
function openInfo(theFile){
	var subWin = window.open(theFile,"subWin","width=502,height=502,left=0, top=0scrollbars,resizable")
	subWin.creator=self
}

