<!-- CORE JAVASCRIPT FUNCTIONS -->

<!--//--><![CDATA[//><!--

RUZEE.Borders.add({
	'#stepBlock': { borderType:'simple', cornerRadius:10 },
});
window.onload=function(){
	RUZEE.Borders.render();
};

window.name = 'catalog';
function popup(url) {
	var newWindow=window.open(url,'child','resizable=yes,scrollbars=yes,height=535,width=400');
}
function gallery(id) {
	var newWindow=window.open('popup.php?id='+id,'child','resizable=yes,scrollbars=yes,height=600,width=600');
}
function galleryView(id) {
	var newWindow=window.open('gallery.php?id='+id,'child','resizable=yes,scrollbars=yes,height=600,width=600');
}
function check(f) {
	var count = f.elements.length;
	for (e=0;e<count;e++) {
		if (f.elements[e].name == "os0" || f.elements[e].name == "os1") {
			if (f.elements[e].value == "none") {
				var partname = "sole";
				if (f.elements[e].name == "os1") {
					partname = "upper";
				}
				alert("Please select the "+partname+" size.");
				f.elements[e].focus();
				return(false);
			}
		}
	}
}

function submitForm() {
  document.shopping_bag.submit();
}

function toggle(tid) {
	if (document.getElementById(tid).style.display == "none") {
		document.getElementById(tid).style.display = "";
	} else {
		document.getElementById(tid).style.display = "none";
	}
}

function makeSublist(parent,child,isSubselectOptional,childVal) {
	$("body").append("<select style='display:none' id='"+parent+child+"'></select>");
	$('#'+parent+child).html($("#"+child+" option"));

	var parentValue = $('#'+parent).attr('value');
	$('#'+child).html($("#"+parent+child+" .sub_"+parentValue).clone());

	childVal = (typeof childVal == "undefined")? "" : childVal ;
	$("#"+child).val(childVal).attr('selected','selected');

	$('#'+parent).change(function(){
		var parentValue = $('#'+parent).attr('value');
		$('#'+child).html($("#"+parent+child+" .sub_"+parentValue).clone());
		if(isSubselectOptional) $('#'+child).prepend("<option value='none' selected='selected'> -- Select -- </option>");
		$('#'+child).trigger("change");
		$('#'+child).focus();
	});
}


//--><!]]>
