I want to launch this after 5 seconds once page gets loaded. How can I do this?

<script type="text/javascript"><!--
window.onload = function() { document.location.href = 'http://www.google.com';}
// --></script>

<script>
function initialize() {
setTimeout('redirectMe()', 5000); //delay 5 seconds
}
function redirectMe() {
location.href = 'http://www.google.com';
}
</script>
<body onLoad="initialize";

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.