/** 
* Gets the pop-up box and information for the selected watch
* @param {Integer} id Watch ID number
* @param {Object} a Link that called function 
*/
function popUpWatchDetail(id,a) {
	div = document.getElementById('detailPopUp');
	div.style.display = 'block';
	document.getElementById('detailPopUpIFrame').src="watchDetail.php?id="+id;
	a.blur();
	return false;
}

function Seiko_popUpWatchDetail(id,catid,a) {
	div = document.getElementById('detailPopUp');
	div.style.display = 'block';
	document.getElementById('detailPopUpIFrame').src="watchDetail.php?id="+id+"&catid="+catid;
	a.blur();
	return false;
}


function closePopUpDetail() {
	document.getElementById('detailPopUp').style.display='none';
}

function Seiko_closePopUpDetail() {
	document.getElementById('detailPopUp').style.display='none';
}



/********************
    Reseller Page
********************/
/**
* showCityList(id)
* @param id
*/
function showCityList(id) {
	document.getElementById('tdCity').innerHTML='<select class="city" size="10" name="city" id="resellerCity">'+document.getElementById('prov'+id).innerHTML+'</select>';
}


/********************
  Watch Finder Page
********************/
var curPage=0;
var curPageEl=false;
var wgFFh=0;

function jsWGNavigation() {
	document.getElementById('WatchGalleryFixedFrame').style.overflow='hidden';
	document.getElementById('wgNavLinks').style.display='block';
	wgFFh=document.getElementById('WatchGalleryFixedFrame').offsetHeight*1;
}

/**
* getWatchGalleryPage(p)
* @param {Integer} p Page number to display
*/
function getWatchGalleryPage(p) {
/*	if (curPageEl !== false) {
  	curPageEl.style.backgroundColor = 'transparent';
  }
	curPageEl = el;
	curPageEl.style.backgroundColor = '#'*/
	if ((p>-1) && (document.getElementById('WatchGalleryMovingFrame').offsetHeight>(p*wgFFh))) {
		document.getElementById('curPageID'+curPage).style.backgroundColor='transparent';
		document.getElementById('curPageID'+curPage).style.border='0';
		curPage=p;
		document.getElementById('curPageID'+curPage).style.backgroundColor='#CCC';
		document.getElementById('curPageID'+curPage).style.border='1px solid #57A';
		document.getElementById('WatchGalleryMovingFrame').style.top='-'+(p*wgFFh)+'px';
	}
}

function popUpWindow(url,width,height) {
	window.open(url,'odysseyPopUp','width='+width+',height='+height+',scrollbars,resizable');
	return false;
}

function showWarningPopup(x) {
	document.getElementById('warningTextPopup').style.display = (x==1) ? 'block' : 'none';
}
