// JavaScript Document
//These functions will be used to show IE users a warning message
//once a day when they try to watch a video
function get_cookie(Name) {
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // if cookie exists
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value
      if (end == -1)
         end = document.cookie.length;
      returnvalue=unescape(document.cookie.substring(offset, end))
      }
   }
  return returnvalue;
}

// alert everybody
function alertOrNot(){
browserName=navigator.appName; 
if ((get_cookie('popunder')=='' && browserName == "Microsoft Internet Explorer")){
	//give alert
	promoteFF();
	//see if we need to set cookie
	if(get_cookie('popunder')==''){
		setcookie("popunder","yes",3);
		}
	}
}

function promoteFF(){
	//give firefox plug
	$msg = "It appears you\'re using Internet Explorer which has been known to cause problems when viewing some videos. Many of our visitors prefer using Firefox with Yahoo toolbar, which is also recommended by Google and Yahoo.\n\nIf you would like to experience optimum performance when viewing our videos please click 'OK' for further information." ;
	//$msg = "Internet Explorer users may have trouble viewing some videos. To rectify this please try installing Yahoo toolbar.\n\nClick YES to install toolbar";
	//$link = "http://www.getmusicvideocodes.com/warning.php";
	$link = "http://www.kqzyfj.com/click-1498714-10494328";
	if(confirm($msg)){
		//redirect
		window.location = $link;
	}
}

function setcookie(name,value,duration){
cookiestring=name+"="+escape(value)+";EXPIRES="+getexpirydate(duration);
document.cookie=cookiestring;
}

function getexpirydate( nodays){
var UTCstring;
Today = new Date();
nomilli=Date.parse(Today);
Today.setTime(nomilli+nodays*24*60*60*1000);
UTCstring = Today.toUTCString();
return UTCstring;
}

//MAIN: run script
alertOrNot();