//Scrolling Layer Intiation - function needed for scrolling layer to operate
function initScrollLayer() {var wndo = new dw_scrollObj('wn', 'lyr1', 't1'); dw_scrollObj.GeckoTableBugFix('wn');}

moving=0;
position=0;
function moveShape(direction,moves) {

if (moving==0) {moving=1;

if (direction=='right') {position=position+1}
else {position=position-1}

if (position>0) {}
if (position==0) {}

if (position<moves) {}
if (position==moves) {}

setTimeout("stopShape()",600);
dw_scrollObj.initScroll('wn',direction)
}
}

function stopShape() {dw_scrollObj.stopScroll('wn');moving=0;}

 
function hideALL() {
if (show==1) {

if (document.getElementById('ddm3')) {hideObject('ddm3',0);} if (document.getElementById('ddm2')) {hideObject('ddm2',0);}
if (document.getElementById('ddm5')) {hideObject('ddm5',0);} if (document.getElementById('ddm4')) {hideObject('ddm4',0);}
if (document.getElementById('ddm6')) {hideObject('ddm6',0);}
if (document.getElementById('ddm9')) {hideObject('ddm9',0);}
if (document.getElementById('ddm')) {hideObject('ddm',0);}
show=0;
}
}

show=0;
opened="";

function showObject(obj,h,w) {



if(show==0) {show=1; opened=obj; document.getElementById(obj).style.display = "block"; document.getElementById(obj).style.height = h; document.getElementById(obj).style.width = w;	} else{hideObject(opened)}}

function hideObject(obj,state) {document.getElementById(obj).style.display = "none"; show=0;}

//PopUp Generator
function _popup(url, width, height, scrl)
    {window.open(url, '_blank', 'left=100,top=100,width='+width+',height='+height+',scrollbars='+scrl);
}
//Triggers
function weightchange(val){ //Trigger of weight change
    alert('Weight changed to ' + val);
}

function colorchange(val){ //Trigger of color change
    alert('Color changed to ' + val);
}

function claritychange(val){ //Trigger of clarity change
    alert('Clarity changed to ' + val);
}

function materialchange(val){ //Trigger of material change
    alert('Material changed to ' + val);
}

function ringstylechanged(val){ //Trigger of style change

    document.getElementById('ringstyle').innerHTML = val;


   // alert('Style changed to ' + val);
}
