﻿//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// DECLARATION OF ALL THE PARAMETERS TO BE PASSED TO THE FLASH PEEL 
//DISPLAY FREQUENCY enter 1 to always display, 2 for ONCE per browser session
//var displaymode=1
//AUTO HIDE Set duration PeelAwayAd should appear on screen, in milliseconds (10000=10 sec, 0=perpetual)
//var displayduration=0
//AUTO SCROLL Should PeelAwayAd scroll down page as user scrolls? true=scroll false=don't scroll
var allowscroll=true
// TOP PLACEMENT value How many pixels from Top should Peel be dislpayed
var ptop = 0;
// RIGHT PLACEMENT How many pixels from right should Peel be displayed
var pright = 0;
// PEEL DELAY set time delay to show peel in millisecond (10000=10 sec, 0=instantly)
var delay = 0;
// ROTATING SMALL IMAGES - To set small image or swf files for small peel background
smallimg = new Array();
smallimg[0]= 'cover/cover_nho.jpg';
smallimg[1]= 'cover/cover_nho.jpg';
smallimg[2]= 'cover/cover_nho.jpg';
smallimg[3]= 'cover/cover_nho.jpg';
// SMALL SCROLLING TEXT To set the text scrolling on the smaller flash
var scrolltxtsmall = "";
// SMALL FONT - To set the font size of the text scrolling on the smaller flash
var txtsizesmall = "10";
//SMALL COLOR - To set the text color of the text scrolling on the smaller flash
var textcolorsmall = "FF0000";
// ROTATING BACKGROUND IMAGES - To set bigger image or swf files
bigimg = new Array();
bigimg[0] = "cover/cover_to2.jpg";
bigimg[1] = "cover/cover_to2.jpg";
bigimg[2] = "cover/cover_to2.jpg";
bigimg[3] = "cover/cover_to2.jpg";
// ROTATING URLs - To set URL which will open on click of bigger flash
urlval = new Array();
urlval[0] = "http://www.taydo.in/listpage/14/62/Bang-gia-Email-hosting-VN.html";
urlval[1] = "http://www.taydo.in/listpage/14/62/Bang-gia-Email-hosting-VN.html";
urlval[2] = "http://www.taydo.in/listpage/14/62/Bang-gia-Email-hosting-VN.html";
urlval[3] = "http://www.taydo.in/listpage/14/62/Bang-gia-Email-hosting-VN.html";
// OPEN IN SAME WINDOW - To set whether the URL will open in a new window or same window
var owindow = "self" // to open in a new blank window - blank ; to open in the same window - self
// BIG SCROLLING TEXT To set the text scrolling on the bigger flash
var scrolltxtbig = "";
// BIG TEXT FONTTo set the font size of the text scrolling on the bigger flash
var txtsizebig = "50";
// BIG TEXT COLORTo set the text color of the text scrolling on the bigger flash
var textcolorbig = "00FF00";
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////                  DO NOT CHANGE ANYTHING AFRTER THIS COMMENT              /////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

var iw=0;
var ih=0;
var ix=0;

if (window.innerWidth){ //if browser supports window.innerWidth (FF 3+)
iw=window.innerWidth
ih=window.innerHeight
ix=-16;
}
else if (document.all){ //else if browser supports document.all (IE 4+)
iw=document.body.clientWidth
ih=document.body.clientHeight
ix=0;
}

var pw=100;

function setpos(param1, param2, param3, param4, param5) 
{ 	
	if (param3 == '0px') 
	{ 
	pw=543;
	theobject.style.right=pw+'px';
	theobject.innerHTML=div_unlayout;
	}
	if (param3 == '-1000px') 
	{ 
	pw=100;
	theobject.style.right=pw+'px';
	theobject.innerHTML=div_cvlayout;
	}
	if (navigator.appName.indexOf('ro')!= -1) 
	{ 
	window.resizeBy(-1,-1); window.resizeBy(1,1); 
	}
}

function cover_DoFSCommand(command, args) //FSCommand to uncover the banner
{ 
if (command == 'act_ppo') 
	{ 
	pw=543;
	theobject.style.right=pw+'px';
	theobject.innerHTML=div_unlayout;
	}
}

function uncover_DoFSCommand(command, args) //FSCommand to cover the banner
{ 
	if (command == 'act_ppc') 
	{ 
	pw=100;
	theobject.style.right=pw+'px';
	theobject.innerHTML=div_cvlayout;
	}
}

var div_cvlayout='<span id="cvlayout" style="position:relative; width:100px; height:100px; z-index:19001;">'+'<embed src="cover/cover.swf" id="cover" name="cover" wmode="transparent" flashvars="smallimg='+smallimg+'&scrolltxtsmall='+scrolltxtsmall+'&txtsizesmall='+txtsizesmall+'&textcolorsmall='+textcolorsmall+'&delay='+delay+'" width="100" height="100" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>'+'</span>';

var div_unlayout='<span id="unlayout" style="position:relative; height:543px; width:543px; z-index:20000;">'+'<embed src="cover/uncover.swf" wmode="transparent" width="543" height="543" flashvars="bigimg='+bigimg+'&urlval='+urlval+'&window='+owindow+'&scrolltxtbig='+scrolltxtbig+'&txtsizebig='+txtsizebig+'&textcolor='+textcolorbig+'&yaxis=0" id="uncover" name="uncover" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>'+'</span>';


var iebody=(document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body

var dsocleft=document.all? iebody.scrollLeft : window.pageXOffset
var dsoctop=document.all? iebody.scrollTop : window.pageYOffset

var peelad_dv='<p id="peelad_wrap" style="position:fixed;top:'+ix+'px;right:0px;z-index:18001;"><span id="peelad">'+'</span></p>'

document.write(peelad_dv)

var theobject=document.all? document.all.peelad : document.getElementById("peelad")
var iebody=(document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body
 
if (document.all||document.getElementById)
theobject.style.visibility="hidden"
 
function regenerate(){
window.location.reload()
}

function showhide(){
if (document.all||document.getElementById){
if (theobject.style.visibility=="hidden"){
//doit=setInterval("positionit()",500)
theobject.style.visibility="visible"
theobject.innerHTML=div_cvlayout;
}
else{
theobject.style.visibility="hidden"
//clearInterval(doit)
}
}
}

function positionit(){
var dsocleft=document.all? iebody.scrollLeft : pageXOffset
var dsoctop=document.all? iebody.scrollTop : pageYOffset
if (document.all||document.getElementById){
theobject.style.right=pright+pw+"px";
if (allowscroll){
theobject.style.top=ptop+dsoctop+"px";}
else {
theobject.style.top=ptop+"px";
}
}
}

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 (iw>=800){
showhide()
}

//alert(iw);

//window.onresize=regenerate


/* FireFox resize workaround start*/

var startWidth = document.getElementsByTagName("body")[0].offsetWidth;
/*
function checkFFresize() {
var resizeWidth = document.getElementsByTagName("body")[0].offsetWidth;
if (resizeWidth == startWidth) {
} else {
startWidth=document.getElementsByTagName("body")[0].offsetWidth;
window.location.href = window.location.href;
}
setTimeout("checkFFresize();",200);
}

if (document.all) {
} else {
setTimeout("checkFFresize();",200);
}*/

/* FireFox resize workaround end*/

var fscommand_script='<script language="VBScript">\n'+'On Error Resume Next\n'+'Sub cover_FSCommand(ByVal command, ByVal args)\n'+'Call cover_DoFSCommand(command, args)\n'+'End Sub\n'+'Sub uncover_FSCommand(ByVal command, ByVal args)\n'+'Call uncover_DoFSCommand(command, args)\n'+'End Sub\n'+'<\/script>\n'

if (navigator.appName && navigator.appName.indexOf('ro') != -1 && navigator.userAgent.indexOf('nd') != -1 && navigator.userAgent.indexOf('3.1') == -1)
document.write(fscommand_script)