<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://www.google.com/jsapi"></script> <!-- loading javascript code from Google -->
<style type="text/css">
body{
background-color:black;
}
#_popUpWindow{
position:fixed;
top:10%;
left:25%;
width:400px;
background-color:blue;
border:thin solid cyan;
}
#_popUpTitleBar{
width:100%;
background-color:green;
}
#_popUpTitleTitle{
float:left;
}
#_popUpClose{
float:right;
}
#_popUpClose:hover{
color:red;
cursor:default;
}
#_popUpBody{
font-size:11px;
color:black;
margin: 5px 5px 5px 5px;
background-color:lightgray;
}
#_popUpButtons{
width:100%;
text-align:center;
}
._popUpButtonAccept,._popUpButtonDenie{
font-size:10px;
height:18px;
margin:2px 2px 2px 2px;
}
</style>
</head>
<body>
<!-- The pop up window div's -->
<div id="_popUpWindow">
<div id="_popUpTitleBar">
<div id="_popUpTitleTitle"></div>
<div id="_popUpClose" title="By Clicking this, you agree to the Terms of Service">X</div>
</div>
<div id="_popUpBody"></div>
<div id="_popUpButtons"><input type="submit" name="accept" value="I accept" class="_popUpButtonAccept" /> <input type="submit" name="denie" value="I Denie" class="_popUpButtonDenie" /></div>
</div></div>
<!-- end of div's -->
<script type="text/javascript">
google.load("jquery","1.3.2"); // loading the jquery libary
google.setOnLoadCallback(function () { // this is instead of using $(document).ready(function() { } );
//setting some variables:
var popUpTitle = "Terms of Service";
var popUpBody = "By closing this popup you agree to the fact that Andertraaks is <b>awesome</b><br />Credits goes 100% to Andertraaks of RaGEZONE.";
var allowHTML = true;
//checking if you set allowHTML to true or false (Baiscly allows html tags to be used or not)
if (allowHTML === true) {
$('#_popUpTitleTitle').html(popUpTitle);
$('#_popUpBody').html(popUpBody);
}
else if (allowHTML === false) {
$('#_popUpTitleTitle').text(popUpTitle);
$('#_popUpBody').text(popUpBody);
}
// Settin a 'function' to be able to 'close' the popup
$('#_popUpClose').click(function() {
$('#_popUpWindow').html("");
$('#_popUpWindow').css('border','none');
});
$('._popUpButtonAccept').click(function() { // this works as the same as close
$('#_popUpWindow').html("");
$('#_popUpWindow').css('border','none');
});
$('._popUpButtonDenie').click(function () {
window.location = ""; // Enter a destination where users that presses denie should be forwarded to.
});
});
//end of script
</script>
</body>
</html>