dojo.require("dojo.io.*");

var Timer;
function ScrollLeft(){
	Timer = setInterval("document.getElementById('productscrollcontent').scrollLeft -= 2", 15);}
function ScrollRight(){
	Timer = setInterval("document.getElementById('productscrollcontent').scrollLeft += 2", 15);}

//*************************************************************************************
function getProductDetail(pid) {

var bindArgs = {
	url: "http://www.smithworksjewelers.com/pages/products/getproducthtml.php?pid=" + pid,
	//url: getContextPath() + "/pages/products/getproducthtml.php?pid=" + pid,
	load: function(type, data, evt){
		document.getElementById("productcontent").innerHTML=data;
	},
	backButton: function(){
	},
	forwardButton: function(){
	},
	cache:false,
	changeURL: "smithworks"+(new Date()).getTime()
};
var canBind = dojo.io.bind(bindArgs);
}
//*************************************************************************************
function loadDesigner(did, pid, ptid) {

var bindArgs = {
//	url: getContextPath() + "/pages/products/getscrollhtml.php?did=" + did + "&ptid=" + ptid,
	url: "http://www.smithworksjewelers.com/pages/products/getscrollhtml.php?did=" + did + "&ptid=" + ptid,
	load: function(type, data, evt){
		//alert ("?did=" + did + "&ptid=" + ptid);
		document.getElementById("productscrollcontent").innerHTML=data;
		document.getElementById('productscrollcontent').scrollLeft=0;
		getProductDetail(pid);
	},
	backButton: function(){
	},
	forwardButton: function(){
	},
	cache:false,
	changeURL: "smithworks"+(new Date()).getTime()
};
var canBind = dojo.io.bind(bindArgs);
}
