//enter the message you wish to be shown, including html tag


//var message='<div style="background-color: transparent ; height: 30px ; /*be careful bitch*/position: fixed ; position: expression("absolute");text-align: center ;width:90% ; z-index: 1000 ; background:#none ; bottom: 0px ; left: 100px ; width:100% ; text-align:center ;_position: absolute ;position: expression("absolute");top: expression(eval(document.body.scrollTop)+10);_bottom: 0px ; _background-color: transparent ; _height: 30px ; _text-align: center ;_width:90%;_z-index: 1000 ; _background:none;_left: 75px ;_width:990px;_text-align:center;"><div id="ox_b3d02353418030f163faa9393f21088b" style="display: inline ;_display: inline-table;"><table width="990px"  height ="30" bgcolor="#990000" style="background-position:top ; position: expression("absolute");top: expression(eval(document.body.scrollTop)+10);background-repeat:no-repeat; top:inherit;_background-position:top; _background-repeat:no-repeat; _top:inherit;"><tr><td><font color=#000000 size=4 face="Arial"><marquee align="left" scrollamount="5" width="990px" behavior="scroll" onMouseOver="this.stop();" onMouseOut="this.start();"><font color="#FFFFFF"><b>Singapore: </b> 76 Bras Basah Road #01-01 Singapore 189558, Hotline: +65 6337 0090 , Email: contact@thsc.com.sg || <b>Malaysia:</b> 76, Jalan Tun Sambanthan Brickfields, 50470 Kuala Lumpur Wilayah Persekutuan, Malaysia , Hotline: +603 2260 6233, +603 2260 5742, +603 2260 4953, Email: info@thehearingsolutionco.com.my || <b>Indonesia: </b>  Jl.Salemba Raya No 34-36 Jakarta,  10430 Indonesia, Hotline: +62 21 31902323, Email: abdi@alatbantudengar.com</marquee></font></td></tr></table></div></div>'


//enter a color name or hex to be used as the background color of the message
var backgroundcolor="none"

//enter 1 for always display, 2 for ONCE per browser session
var displaymode=1

//Set duration message should appear on screen, in seconds (10000=10 sec, 0=perpetual)
var displayduration=0

//enter 0 for non-flashing message, 1 for flashing
var flashmode=1
//if above is set to flashing, enter the flash-to color below
//var flashtocolor="lightyellow"


///////////////do not edit below this line////////////////////////////////////////
var ie=document.all
var ieNOTopera=document.all&&navigator.userAgent.indexOf("Opera")==-1

function regenerate(){
window.location.reload()
}

function regenerate2(){
if (document.layers)
setTimeout("window.onresize=regenerate",400)
}

var which=0

function flash(){
if (which==0){
if (document.layers)
topmsg_obj.bgColor=flashtocolor
else
topmsg_obj.style.backgroundColor=flashtocolor
which=1
}
else{
if (document.layers)
topmsg_obj.bgColor=backgroundcolor
else
topmsg_obj.style.backgroundColor=backgroundcolor
which=0
}
}

if (document.getElementById)
{
document.write('<div id="topmsg" style="position:fixed; z-index:1000;_position:fixed; _z-index:1000;">'+message+'</div>')
}
var topmsg_obj=ie? document.all.topmsg : document.getElementById? document.getElementById("topmsg") : document.topmsg

function positionit(){
var dsocleft=ie? document.body.scrollLeft : pageXOffset
var dsoctop=ie? document.body.scrollTop : pageYOffset
var window_width=ieNOTopera? document.body.clientWidth : window.innerWidth-20
var window_height=ieNOTopera? document.body.clientHeight : window.innerHeight

if (ie||document.getElementById){
topmsg_obj.style.left=parseInt(dsocleft)+window_width/2-topmsg_obj.offsetWidth/2
topmsg_obj.style.top=parseInt(dsoctop)+parseInt(window_height)-topmsg_obj.offsetHeight-4
}
else if (document.layers){
topmsg_obj.left=dsocleft+window_width/2-topmsg_obj.document.width/2
topmsg_obj.top=dsoctop+window_height-topmsg_obj.document.height-5
}
}

function setmessage(){
if (displaymode==2&&(!display_msg_or_not()))
return
if (document.layers){
topmsg_obj=new Layer(window.innerWidth)
topmsg_obj.bgColor=backgroundcolor
regenerate2()
topmsg_obj.document.write(message)
topmsg_obj.document.close()
positionit()
topmsg_obj.visibility="show"
if (displayduration!=0)
setTimeout("topmsg_obj.visibility='hide'",displayduration)
}
else{
positionit()
topmsg_obj.style.backgroundColor=backgroundcolor
topmsg_obj.style.visibility="visible"
if (displayduration!=0)
setTimeout("topmsg_obj.style.visibility='hidden'",displayduration)
}
setInterval("positionit()",100)
if (flashmode==1)
setInterval("flash()",1000)
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = ""
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset)
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function display_msg_or_not(){
if (get_cookie("displaymsg")==""){
document.cookie="displaymsg=yes"
return true
}
else
return false
}

if (document.layers||document.getElementById)
window.onload=setmessage
