Hello Guys, i need your help, i'm trying use the Pop-Up code of Adz2You
<!--[ POPUP code show every 5 Minutes . For Username: tgerty09ui50y - Adz2you // ads.adz2you.com/home.php // ]-->
<script type="text/javascript">
function setCookie(cname, cvalue){
var d = new Date();
d.setTime(d.getTime() + (5 * 60 * 1000));
var expires = "expires="+d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
function getCookie(cname){
var name = cname + "=";
var ca = document.cookie.split(';');
for(var i = 0; i < ca.length; i++){
var c = ca;
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
function openPopup(url, title, w, h){
var dualScreenLeft = window.screenLeft != undefined ? window.screenLeft : window.screenX;
var dualScreenTop = window.screenTop != undefined ? window.screenTop : window.screenY;
var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;
var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;
var left = ((width / 2) - (w / 2)) + dualScreenLeft;
var top = ((height / 2) - (h / 2)) + dualScreenTop;
var newWindow = window.open(url, title, 'scrollbars=yes, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
if (window.focus){
newWindow.focus();
}
}
document.addEventListener('click', function(){
var show_popup = getCookie('show_popup');
var opened = false;
if(show_popup == ''){
setCookie('show_popup', '1');
if(!opened){
opened = true;
var url = 'http://ads.adz2you.com/?tgerty09ui50y';
openPopup(url, '', 800, 600);
}
}else{
opened = false;
}
});
</script>
<!--[ End POPUP code of the Ad Tag - Adz2you // ads.adz2you.com/home.php // ]-->
but i no know where i put this code, because Wix use a box of Html, i want execute this code when i click anywhere the site every 5 minutes
or just another pop-up code that open this page http://ads.adz2you.com/?tgerty09ui50y, because when i try use the box i need click in him to work the pop up
<!--[ POPUP code show every 5 Minutes . For Username: tgerty09ui50y - Adz2you // ads.adz2you.com/home.php // ]-->
<script type="text/javascript">
function setCookie(cname, cvalue){
var d = new Date();
d.setTime(d.getTime() + (5 * 60 * 1000));
var expires = "expires="+d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
function getCookie(cname){
var name = cname + "=";
var ca = document.cookie.split(';');
for(var i = 0; i < ca.length; i++){
var c = ca;
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
function openPopup(url, title, w, h){
var dualScreenLeft = window.screenLeft != undefined ? window.screenLeft : window.screenX;
var dualScreenTop = window.screenTop != undefined ? window.screenTop : window.screenY;
var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;
var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;
var left = ((width / 2) - (w / 2)) + dualScreenLeft;
var top = ((height / 2) - (h / 2)) + dualScreenTop;
var newWindow = window.open(url, title, 'scrollbars=yes, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
if (window.focus){
newWindow.focus();
}
}
document.addEventListener('click', function(){
var show_popup = getCookie('show_popup');
var opened = false;
if(show_popup == ''){
setCookie('show_popup', '1');
if(!opened){
opened = true;
var url = 'http://ads.adz2you.com/?tgerty09ui50y';
openPopup(url, '', 800, 600);
}
}else{
opened = false;
}
});
</script>
<!--[ End POPUP code of the Ad Tag - Adz2you // ads.adz2you.com/home.php // ]-->
but i no know where i put this code, because Wix use a box of Html, i want execute this code when i click anywhere the site every 5 minutes
or just another pop-up code that open this page http://ads.adz2you.com/?tgerty09ui50y, because when i try use the box i need click in him to work the pop up