// show active link
function showActiveLink(){
	var a = document.getElementsByTagName('a');
	var url = location.href;
	
	for (var i=0; i < a.length; i++) {
		if (a[i].href == location.href) {
			if (a[i].className == 'header_nav') {
				a[i].style.cssText = "color:#fff;";
			}else if (a[i].className == 'nav_grid_thumb') {
				a[i].style.cssText = "border: solid 1px #fff;";
			}else{
				a[i].style.cssText = "color:#fff;";
			}
		};
		
		// header nav
		if (url.search('/jewelry/') != '-1') {
			$('nav_jewelry').style.cssText = "color:#fff;";
		}
		
		// jewelry subnav
		if (url.search('/pendant-detail/') != '-1') {
			$('subnav_pendants').style.cssText = "color:#fff;";
		}
		else if (url.search('/charm-detail/') != '-1') {
			$('subnav_charms').style.cssText = "color:#fff;";
		}
		else if (url.search('/necklace-detail/') != '-1') {
			$('subnav_necklaces').style.cssText = "color:#fff;";
		}
		else if (url.search('/mens-detail/') != '-1') {
			$('subnav_mens').style.cssText = "color:#fff;";
		}
		
	};
}

var count=0;
function popup(path,width,height) {
	count++;
	wleft=(screen.width-width)/2;
	wtop=(screen.height-height)/2;
	new_window=window.open(path,count,"width="+(width)+",height="+(height)+",left="+(wleft)+",top="+(wtop));
}