function PopUp(win, pxw, pxy) {
  fenster = window.open('', win, 'resizable,scrollbars=yes,width=' + pxw + ',height=' + pxy + ',dependent=yes');
  fenster.focus();
}

function popupA(theName) {
	PopUp(theName, 300, 550);
}
function popupB(theName) {
	PopUp(theName, 350, 400);
}
function popupC(theName) {
	PopUp(theName, 550, 400);
}
function popupD(theName) {
	PopUp(theName, 550, 700);
}
function popupTEC(theName) {
	PopUp(theName, 700, 550);
}
function popupCOUPON(theName) {
	PopUp(theName, 750, 400);
}
function orderwin(theName) {
	PopUp(theName, 700, 550);
}

function markcell(theID, theAction) {
	var theDefaultColor = '#000000';
	var thePointerColor = '#666666';
	if (theAction == 'over' && thePointerColor != '') {
	    newColor = thePointerColor;
	}
	else if (theAction == 'out' && theDefaultColor != '') {
	    newColor = theDefaultColor;
	}
	document.getElementById(theID).setAttribute('bgcolor', newColor, 0);
}

function flash(No, c, x) {
	var theDefaultColor = '#000000';
	var thePointerColor = '#cccccc';
	if (c == null) {
		c = 0;
	}
	if (x == null) {
		x = 0;
	}
	if (c < No) {
		c++;
		theID = 'd'+c;
		document.getElementById(theID).setAttribute('bgcolor', thePointerColor, 0);
		if (c > 1) {
			theID = 'd'+(c-1);
			document.getElementById(theID).setAttribute('bgcolor', theDefaultColor, 0);
		}
	} else {
		x++;
		theID = 'd'+c;
		if (x == 1) {
			document.getElementById(theID).setAttribute('bgcolor', theDefaultColor, 0);
		} else if (x == 3) {
			document.getElementById(theID).setAttribute('bgcolor', thePointerColor, 0);
		} else if (x > 4) {
			document.getElementById(theID).setAttribute('bgcolor', theDefaultColor, 0);
			return true;
		}
	}
	setTimeout('flash(' + No + ', ' + c + ', ' + x + ')',10);
}

function flashreverse(No, c, x) {
	var theDefaultColor = '#000000';
	var thePointerColor = '#cccccc';
	if (c == null) {
		c = No;
		c++;
	}
	if (x == null) {
		x = 0;
	}
	if (c > 1) {
		c--;
		theID = 'd'+c;
		document.getElementById(theID).setAttribute('bgcolor', thePointerColor, 0);
		if (c < No) {
			theID = 'd'+(c+1);
			document.getElementById(theID).setAttribute('bgcolor', theDefaultColor, 0);
		}
	} else {
		x++;
		theID = 'd'+c;
		if (x == 1) {
			document.getElementById(theID).setAttribute('bgcolor', theDefaultColor, 0);
		} else if (x == 3) {
			document.getElementById(theID).setAttribute('bgcolor', thePointerColor, 0);
		} else if (x > 4) {
			document.getElementById(theID).setAttribute('bgcolor', theDefaultColor, 0);
			return true;
		}
	}
	setTimeout('flash(' + No + ', ' + c + ', ' + x + ')',10);
}

