var topLeft = 0; var topRight = 1; var bottomLeft = 2; var bottomRight = 3; var hScroll = 0; var vScroll = 1; var ownserver ='http://www.asians247.com'; function SLPopUp(width, height, content, title, popUpId) { if(!popUpId) popUpId='slpopup'; this.width = width; this.height = height; this.content = content; this.title = title; this.backgroundColor = '#fff'; this.borderTopLeftColor = '#d0d0d0'; this.borderBottomRightColor = '#000'; this.font = ''; this.fontSize = 0; this.fontColor = '#fff'; this.titleFont = ''; this.titleFontSize = 0; this.titleFontColor = '#000'; this.titleBackgroundColor = '#003399'; this.startPos = topLeft; this.scrollDirection = hScroll; this.scrollBy = 5; this.scrollTimer = 50; this.scrollInit = true; this.autocloseSecs = 0; this.cookieSecs = 0; this.closeImg = 'http://liveads.camdough.com/a247IMpopAd/close.png'; this.start = 0; this.end =0; this.closing = false, this.popUpDiv = null; this.init = init; this.show = show; this.scroll = scroll; this.close = close; document.write(''); this.popUpDiv = document.getElementById(popUpId); document.getElementById(popUpId+'-closelnk').popUp = this; function init() { this.popUpDiv.style.backgroundColor = this.backgroundColor; this.popUpDiv.style.borderRight = '0px solid ' + this.borderBottomRightColor; this.popUpDiv.style.borderBottom = '0px solid ' + this.borderBottomRightColor; this.popUpDiv.style.borderLeft = '0px solid ' + this.borderTopLeftColor; this.popUpDiv.style.borderTop = '0px solid ' + this.borderTopLeftColor; this.popUpDiv.style.height = this.height + 'px'; this.popUpDiv.style.width = this.width + 'px'; var div = document.getElementById(popUpId+'-title'); if(this.title) { var style = ''; div.style.textAlign = 'center'; div.style.padding = '0px'; if(this.titleFont) div.style.fontFamily = this.titleFont; if(this.titleFontSize) div.style.fontSize = this.titleFontSize +'pt'; if(this.titleFontColor) div.style.color = this.titleFontColor; if(this.titleBackgroundColor) div.style.backgroundColor = this.titleBackgroundColor; div.innerHTML = '
' + this.title; } document.getElementById(popUpId+'-closeimg').popUp = this; var divc = document.getElementById(popUpId+'-content'); divc.style.padding = '0px'; if(this.font) divc.style.fontFamily = this.font; if(this.fontSize) divc.style.fontSize = this.fontSize + 'pt'; divc.innerHTML = this.content; } function show() { if(wgp_getCookie(popUpId)=='1') return; this.scrollInit=true; this.init(); if(this.cookieSecs) { wgp_setCookie(popUpId, '1', this.cookieSecs); } var self = this; this.f = function() { if(self.closing) { self.closing=false; self.close(); } else if(self.scroll()) { setTimeout(self.f, self.scrollTimer); } else { if(self.autocloseSecs) { self.closing = true; setTimeout(self.f, self.autocloseSecs*1000); } } } this.timer = setTimeout(this.f, this.scrollTimer); } function close() { this.popUpDiv.style.visibility="hidden"; } function scroll() { if(this.scrollInit) { var myWindow = new Object(); wgp_windowSize(myWindow); switch(this.startPos) { case topLeft: if(this.scrollDirection == vScroll) { this.start = myWindow.scrollY - this.height; this.end = this.start + this.height +5; this.popUpDiv.style.top = this.start + 'px'; this.popUpDiv.style.left = myWindow.scrollX + 5 + 'px'; } else { this.start = myWindow.scrollX - this.width; this.end = this.start + this.width + 5; this.popUpDiv.style.left = this.start + 'px'; this.popUpDiv.style.top = myWindow.scrollY + 5 + 'px'; } break; case topRight: if(this.scrollDirection == vScroll) { this.start = -this.height + myWindow.scrollY; this.end = this.start + this.height + 5; this.popUpDiv.style.top = this.start + 'px'; this.popUpDiv.style.right = 5 - myWindow.scrollX + 'px'; } else { this.start = -this.width - myWindow.scrollX; this.end = this.start + this.width + 5; this.popUpDiv.style.right = this.start + 'px'; this.popUpDiv.style.top = 5 + myWindow.scrollY + 'px'; } break; case bottomLeft: if(this.scrollDirection == vScroll) { this.start = -this.height - myWindow.scrollY; this.end = this.start + this.height + 20; this.popUpDiv.style.bottom = this.start + 'px'; this.popUpDiv.style.left = myWindow.scrollX + 5 + 'px'; } else { this.start = myWindow.scrollX - this.width; this.end = this.start + this.width +5; this.popUpDiv.style.left = this.start + 'px'; this.popUpDiv.style.bottom = 20 - myWindow.scrollY + 'px'; } break; case bottomRight: if(this.scrollDirection == vScroll) { this.start = -this.height - myWindow.scrollY; this.end = this.start + this.height; this.popUpDiv.style.bottom = this.start + 'px'; this.popUpDiv.style.right = 0 - myWindow.scrollX + 'px'; } else { this.start = -this.width - myWindow.scrollX; this.end = this.start + this.width; this.popUpDiv.style.right = this.start + 'px'; this.popUpDiv.style.bottom = 0 - myWindow.scrollY + 'px'; } break; } this.popUpDiv.style.visibility="visible"; this.scrollInit = false; } if(f=this.start < this.end) { this.start += this.scrollBy; switch(this.startPos) { case topLeft: if(this.scrollDirection == vScroll) { this.popUpDiv.style.top = this.start + 'px'; } else { this.popUpDiv.style.left = this.start + 'px'; } break; case topRight: if(this.scrollDirection == vScroll) { this.popUpDiv.style.top = this.start + 'px'; } else { this.popUpDiv.style.right = this.start + 'px'; } break; case bottomLeft: if(this.scrollDirection == vScroll) { this.popUpDiv.style.bottom = this.start + 'px'; } else { this.popUpDiv.style.left = this.start + 'px'; } break; case bottomRight: if(this.scrollDirection == vScroll) { this.popUpDiv.style.bottom = this.start + 'px'; } else { this.popUpDiv.style.right = this.start + 'px'; } break; } } return f; } } function wgp_windowSize(myWindow) { var myWidth = 0; var myHeight = 0; if( typeof( window.innerWidth ) == 'number' ) { myWidth = window.innerWidth; myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; } myWindow.width = myWidth; myWindow.height = myHeight; var scrOfX = 0; var scrOfY = 0; if( typeof( window.pageYOffset ) == 'number' ) { scrOfY = window.pageYOffset; scrOfX = window.pageXOffset; } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) { scrOfY = document.body.scrollTop; scrOfX = document.body.scrollLeft; } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) { scrOfY = document.documentElement.scrollTop; scrOfX = document.documentElement.scrollLeft; } myWindow.scrollX = scrOfX; myWindow.scrollY = scrOfY; } function wgp_setCookie(name, value, secs) { if (secs) { var date = new Date(); date.setTime(date.getTime()+(secs*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function wgp_getCookie(name) { var sn = name + "="; var ca = document.cookie.split(';'); for(var i=0; i
'); var myPopUp = new SLPopUp(136,141,'
',' ');document.write('
'); myPopUp.backgroundColor = '#cccccc'; myPopUp.borderTopLeftColor = '#d0d0d0'; myPopUp.borderBottomRightColor = '#000'; myPopUp.font = 'arial,verdana,sans-serif'; myPopUp.fontSize = 8; myPopUp.fontColor = '#999999'; myPopUp.titleFont = 'arial,verdana,sans-serif'; myPopUp.titleFontSize = 8; myPopUp.titleFontColor = '#fff'; myPopUp.titleBackgroundColor = '#005e99'; myPopUp.startPos = bottomRight; myPopUp.scrollDirection = vScroll; myPopUp.scrollBy = 5; myPopUp.scrollTimer = 50; myPopUp.autocloseSecs = 0; myPopUp.cookieSecs = 0; myPopUp.show();