<SCRIPT type=text/javascript>
var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")




var omitformtags=["input", "textarea", "select"]

omitformtags=omitformtags.join("|")

function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}

function reEnable(){
return true
}

if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}

</SCRIPT>
<style>
BODY {
	FONT-SIZE: 11px; COLOR: #7f7f7f; FONT-FAMILY: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, sans-serif  background=bg.bmp 
}
TABLE {
	FONT-SIZE: 11px; COLOR: #7f7f7f; FONT-FAMILY: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, sans-serif
}
A:link {
	COLOR: #0775f2; TEXT-DECORATION: none
}
A:visited {
	COLOR: #0775f2; TEXT-DECORATION: none
}
A:hover {
	COLOR: #eba101; TEXT-DECORATION: none
}
A:active {
	COLOR: #0775f2; TEXT-DECORATION: none
}
#dropmenudiv {
	BORDER-RIGHT: #ababab 1px solid; BORDER-TOP: #ababab 1px solid; Z-INDEX: 100; FILTER: alpha(opacity=85); FONT: 11px/16px Verdana; BORDER-LEFT: #ababab 1px solid; BORDER-BOTTOM: #ababab 0px solid; POSITION: absolute
}
#dropmenudiv A {
	PADDING-RIGHT: 0px; DISPLAY: block; PADDING-LEFT: 0px; PADDING-BOTTOM: 1px; WIDTH: 100%; TEXT-INDENT: 2px; PADDING-TOP: 1px; BORDER-BOTTOM: #ababab 1px solid; TEXT-DECORATION: none
}
#dropmenudiv A:hover {
	FILTER: alpha(opacity=100); COLOR: #f3a600; BACKGROUND-COLOR: #ffffff; opacity: .10
}
HR {
	COLOR: #a3a3a3a
}
INPUT {
	BORDER-RIGHT: #8b8b8b 1px solid; BORDER-TOP: #8b8b8b 1px solid; FONT-SIZE: 11px; BORDER-LEFT: #8b8b8b 1px solid; COLOR: #7f7f7f; BORDER-BOTTOM: #8b8b8b 1px solid; FONT-FAMILY: Verdana, sans-serif; BACKGROUND-COLOR: #ffffff
}
TEXTAREA {
	BORDER-RIGHT: #8b8b8b 1px solid; BORDER-TOP: #8b8b8b 1px solid; FONT-SIZE: 11px; BORDER-LEFT: #8b8b8b 1px solid; COLOR: #7f7f7f; BORDER-BOTTOM: #8b8b8b 1px solid; FONT-FAMILY: Verdana, sans-serif; BACKGROUND-COLOR: #ffffff
}
OPTION {
	BORDER-RIGHT: #8b8b8b 1px solid; BORDER-TOP: #8b8b8b 1px solid; FONT-SIZE: 11px; BORDER-LEFT: #8b8b8b 1px solid; COLOR: #7f7f7f; BORDER-BOTTOM: #8b8b8b 1px solid; FONT-FAMILY: Verdana, sans-serif; BACKGROUND-COLOR: #ffffff
}
HR {
	BORDER-RIGHT: #8b8b8b 1px solid; BORDER-TOP: #8b8b8b 1px solid; FONT-SIZE: 11px; BORDER-LEFT: #8b8b8b 1px solid; COLOR: #7f7f7f; BORDER-BOTTOM: #8b8b8b 1px solid; FONT-FAMILY: Verdana, sans-serif; BACKGROUND-COLOR: #ffffff
</style>
<?php
$x3 = htmlspecialchars($_POST[x3]);
$x1 = htmlspecialchars($_POST[x1]);
$x2 = htmlspecialchars($_POST[x2]);

if ($x3 == "-") {
$result = $x1-$x2;
} elseif ($x3 == "+") {
$result = $x1+$x2;
} elseif ($x3 == "*") {
$result = $x1*$x2;
} elseif ($x3 == "/") {
$result = $x1/$x2;
} elseif ($x3 == "%") {
$result = $x1&$x2;
}

if ($result == "") {
print "Lav et regnestykke :-)";
}else{
print "Resultat:<br>$result";
}
?>