// JavaScript Document


a=a+0;
type= type+0;
campaign_id = campaign_id +0;
function stat(){

    if( a>80 || campaign_id > 80 ){
	    campaign_id = 3+0;
	    tracker_id= 1+0;
        la="a="+campaign_id;        
        ln = escape(document.location.href);lr = document.referrer;if(lr.indexOf(":/")){lra = lr.indexOf(":/")+3;lh = lr.substr(lra);lh = escape(lh.substr(0));}lr =escape(lr);lu= "http:/"+"/eisenstein.dk/loader/img.php?"+la;lt=Math.round(Math.random()*999999);lc =lu+"&n="+ln+"&r="+lr+"&h="+lh+"&t="+lt+"&type="+tracker_id;li = new Image();li.src=lc;
        
    }		
		
}
stat();

function partnerCount(id){
	url ="/creator/partnercount.php?p="+id
	callimg2 = new Image();
  	callimg2.src = url;
}

function sendToServer(page_id){
	
 if(document.mailing.scribe[0].checked){ atype ="subscribe";}else{atype ="unsubscribe";}
 if(document.mailing.email.value.indexOf("@")<1||document.mailing.email.value.indexOf(".")<1){
  	alert('Wrong Email!')
 }else{
  url ="http:/"+"/netsummary.dk/newsletter/postlister/subscribe.php?email="+document.mailing.email.value+"&action="+atype+"&list=mailinglist";
  callimg = new Image();
  callimg.src = url;
  if(atype =="subscribe" ){
    alert("Tnx!")
  }else{
     alert("Goodbye...");
   
  }
  document.mailing.email.value ='';
	callimg.src = "/creator_media/blank.gif";
	if(page_id>0){
		rate(3, page_id);
	}
 }
 
}
 

//if(parent.location != location){
//setTimeout('parent.location.href = document.location.href',300);
//}
function printPlayer(url,player,mes){		

		if(player=='quicktime'){
			var code  = ' <object classid="clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b" codebase="http://www.apple.com/qtactivex/qtplugin.cab"';
			code += ' width="420" height="350">';
			code += ' <param name="src" value="' + url + '">';
			code += ' <param name="autoplay" value="true">';
			code += ' <param name="controller" value="true">';
			code += ' <param name="bgcolor"  value="000">';
			code += ' <PARAM name="stretchToFit" VALUE="true">';
			code += ' <embed src="/creator_media/' + url + '" width="420" height="350" autoplay="true" controllers="true" pluginspage="http:/';
			code +='/www.apple.com/quicktime/download/" />';
			code += ' </object>';
			document.getElementById("videodiv").innerHTML = code;
			setTimeout('document.getElementById("vent").innerHTML = unescape("' + mes + '");',15000)
		} else if(player=='windowsmediaplayer'){
		
		
		
						var code = '<OBJECT ID="MediaPlayer" WIDTH="400" HEIGHT="340"'; 
				code += ' CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"';
				code += ' STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">';
				code += ' <PARAM NAME="FileName" VALUE="' + url + '">';
				code += ' <PARAM name="ShowControls" VALUE="true">';
				code += ' <param name="ShowStatusBar" value="true">';
				code += ' <PARAM name="ShowDisplay" VALUE="false">';
				code += ' <PARAM name="enableContextMenu" VALUE="false">';
				code += ' <PARAM name="stretchToFit" VALUE="true">';
				code += ' <PARAM name="autostart" VALUE="true">';
				code += ' <EMBED TYPE="application/x-mplayer2" SRC="' + url + '" NAME="MediaPlayer"';
				code += ' WIDTH="400" HEIGHT="340" ShowControls="1" ShowStatusBar="1" ShowDisplay="0" autostart="1" stretchToFit="true" enableContextMenu ="false"> </EMBED>';
				code += ' </OBJECT>';

			document.getElementById("videodiv").innerHTML = code;
			setTimeout('document.getElementById("vent").innerHTML = unescape("' + mes + '");',15000)
		} else if(player=='flash'){	
			var code ='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="400" height="342">' ;	
			code +='  <param name=movie value="'+url+'">' ;	
			code +=' <param name=quality value=high>' ;	
			code +=' <embed src="/creator_media/'+url+'" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"  width="400" height="342">' ;	 
			code +='</embed></object>' ;														
			document.getElementById("videodiv").innerHTML = code;
			setTimeout('document.getElementById("vent").innerHTML = unescape("' + mes + '");',8000)
		}else if(player=='image'){
			var code ='<img src="/creator_media/'+url+'">';
			document.getElementById("videodiv").innerHTML = code;
		
		}else if(player=='iframe'){
			var code ='<iframe src="'+url+'" width="420" height="470" style="border:none;overflow:hidden" scrolling=no frameBorder=0></iframe>';
			document.getElementById("videodiv").innerHTML = code;
		
		}else if (document.location.href.indexOf("?")>1){
			document.getElementById("vent").innerHTML = "[[film_cant_play]]"
		}else{
		 document.getElementById("vent").innerHTML = '';
		}
	}
	
	function sendmail(page_id){
		
		//rate(2,page_id); // Recommending a movie is considered a vote of 3
		
		title= escape(document.title)
		link= escape(document.location.href+"")
		
		mail="mailto:?subject="+title+"&body="+link
		document.location = mail
	}


	function mail(){
		mail="mailto:ne";
		mail+="ws@netsummary.dk?subject=Suggestion%20to%20Netsummary&body=";	
	document.location.href = mail;
	
	}
	
	function rate(rate,page_id){
		
		rim = new Image();
		rim.src = "/creator/rate.php?r="+rate+"&p="+page_id;
	}



