function confirmLink(theLink, msg, trg) { //v1.0
	cmsg = 'Do you want to ' + msg + '\n ' + trg;
  	var is_confirmed = confirm(cmsg);
   	if (is_confirmed) {
   		theLink.href += '&confirmed=1';
   	}
   	return is_confirmed;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  mixerWindow=window.open(theURL,winName,features);
  if (window.focus) {mixerWindow.focus()}
}

function launchMixer(par) {
	var path;
	if (par) {
		path='/mixer/mixer.php' + par;
	} else {
		path='/mixer/mixer.php';
	}
	mixerWindow=window.open(path,'mixer','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=970,height=497');
	mixerWindow.focus();
}

function contact() {
	w=500;
	h=666;
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings =	'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no';
	contactInfoWindow=window.open('http://www.pointblanklondon.com/contact.php','contact',settings);
	contactInfoWindow.focus();
}
function radioInfo() {
	w=320;
	h=160;
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings =	'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no';
	var path;
	path='http://www.pointblanklondon.com/radiostation.php';
	uploadImageWindow=window.open(path,'radiostation',settings);
	uploadImageWindow.focus();
}

function shareThis(thelink){
	var url=location.href.replace("&", "-amp-");
	url=location.href.replace("?", "-que-");
	var title=document.title;
	thelink.href='http://www.pointblanklondon.com/popups.php?action=sharethis&url='+url+'&title='+title+'&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=205&width=160&modal=false';
	return;
}
function emailThis(thelink){
	var url=location.href.replace("&", "-amp-");
	url=location.href.replace("?", "-que-");
	var title=document.title;
	thelink.href='http://www.pointblanklondon.com/popups.php?action=emailthis&url='+url+'&title='+title+'&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=140&width=550&modal=false';
	return;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function callMceEditor() {
		tinyMCE.init({
			mode : "textareas",
			theme : "advanced",
			editor_selector : "mceEditor",
			width : "100%",
			height : "250",
			content_css : "/mce_editor.css",
			extended_valid_elements : "a[href|target|name]",
			theme_advanced_styles : "Header 1=header1;Header 2=header2", // Theme specific setting CSS classes
			plugins : "table,save,paste",
			theme_advanced_buttons1 : "save,separator,undo,redo,separator,pastetext,pasteword,separator,bold,italic,separator,styleselect,separator,sub,sup,separator,removeformat,cleanup",
			theme_advanced_buttons2 : "",
			theme_advanced_buttons3 : "",
			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			theme_advanced_statusbar_location : "bottom",
			paste_use_dialog : true,
			theme_advanced_resizing : false,
			theme_advanced_resize_horizontal : false,
			paste_auto_cleanup_on_paste : true,
			force_br_newlines : false
		});	
}