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);
}


function alertSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  // window.alert( 'Width = ' + myWidth );
  // window.alert( 'Height = ' + myHeight );
  if (myHeight < 600)
  {
    document.getElementById("horizon").style.top = "0px"; 
    document.getElementById("horizon").style.margin = "0";
  }
}

//window.onload=alertSize;


