<!--
function change(id, newClass) {
	var identity = document.getElementById(id);
	identity.className=newClass;
}

function wchange(id, newClass) {
	var identity = window.opener.document.getElementById(id);
	identity.className=newClass;
}

function miHoverAction(id, newClass) {
		if (miSelected == id) {
			change(id, newClass);
		} 
}

function miHover(id, newClass) {
	miSelected = id;
	//alert(miSelected);
	setTimeout("miHoverAction('"+id+"', '"+newClass+"');", 500);
}

function miClear(id, newClass) {
	change(id, newClass);
	miSelected = '';
}

function printReport() {
	change('layout', 'disappear');
	change('pReport', 'appear print-report');
	print();
	change('pReport', 'disappear');
	change('layout', 'appear');
}

function checkForQuotesAndLength(what,limit) {
		if (limit != "") {
			if (what.value.length>=limit) {
					return false;
				}
		} 
		// A single quote ' = 34 A double quote " = 39
		if ((event.keyCode == 34) || (event.keyCode == 39)) {
			return false;
		}
		//alert(event.keyCode)
}

function Close_ImgDelWindow(type) {
	window.opener.document[type].src = "../images/spacer.gif";
	window.opener.document.bwwForm['h'+type].value = '';
	window.close();
}

function imgDel(type) {
	document[type].src = "../images/spacer.gif";
	document.bwwForm['h'+type].value = '';
	document.bwwForm['hT'+type].value = '';
	change('h'+type+'Add','appear');
	change('h'+type+'Del','disappear');
	if(type.match(/^File/)){
		change('h'+type+'Name','disappear');
	}
}


function Close_ImgWindow(type, path, id, img, fType, fName) {

	window.opener.document.bwwForm.ID.value = id;
	if(type.match(/^File/)){
		window.opener.document[type].src = '../images/icon_'+fType+'.gif';

		myOutput = "<a href=\"../images/"+ path + "/" + img +"\" target=\"_blank\">" + fName + "</a>";

		myDoc = "h"+type+"Name";
		window.opener.document.getElementById(myDoc).innerHTML = myOutput;
		wchange('h'+type+'Name','appear');


	}else{
		window.opener.document[type].src = '../images/'+path+'/' + img;
	}
	window.opener.document.bwwForm['h'+type].value = img;
	wchange('h'+type+'Add','disappear');
	wchange('h'+type+'Del','appear');

	

	

	window.close();
}

function PopupImgCenterWH(page, width, height) {
	  var idStr = "&ID="+document.bwwForm.ID.value;
		var iPathStr = "&iPath="+document.bwwForm.iPath.value;
	  var top=(screen.height-height)/2;
	  var left=(screen.width-width)/2;
	  window.open(page+idStr+iPathStr,"bwwPWin","top="+top+",left="+left+",width="+width+",height="+height+","+"menubar=no,scrollbars=no,statusbar=no");
}

/*----------- Mailer Scripts -----------------------------*/

function Close_MailerImgDelWindow(pos) {
	window.opener.document['Img'+pos].src = "../images/mailer/1pxSpacer.gif";
	window.opener.document.bwwForm['miImg'+pos].value = '';
	window.close();
}


function Close_MailerImg(pos, miID, img) {
	//window.opener.document.bwwForm.pID.value = mmID;
	window.opener.document['Img'+pos].src = "../mailer_images/" + img;
	window.opener.document.bwwForm['miImg'+pos].value = miID;
	window.close();
}

function PopupImgLibCenterWH(page, width, height) {
	  var pIDStr = "&pID="+document.bwwForm.pID.value;
	  var top=(screen.height-height)/2;
	  var left=(screen.width-width)/2;
	  window.open(page+pIDStr,"bwwPWin","top="+top+",left="+left+",width="+width+",height="+height+","+"menubar=no,scrollbars=yes,statusbar=no");
}

function PopupPageCenterWH(page, width, height) {
	  var top=(screen.height-height)/2;
	  var left=(screen.width-width)/2;
	  window.open(page,"bwwPWin","top="+top+",left="+left+",width="+width+",height="+height+","+"menubar=no,scrollbars=yes,statusbar=no");
}

function confirm_deleteRVars(id, retID, rVars, tID, pre) {
	if (confirm('Are you sure you want to delete?')) {
		document.location.href = "delete.php?id="+id+"&return="+retID+"&rVars="+rVars+"&tID="+tID+"&pre="+pre;			
	} else {
		return false;
	}
}
/*----------- End Mailer Scripts -------------------------*/

function Close_Refresh()
{
  window.opener.location.reload();
  window.close();
}


function confirm_delete(id, retID, tID, pre) {
	if (confirm('Are you sure you want to delete?')) {
		document.location.href = "delete.php?id="+id+"&return="+retID+"&tID="+tID+"&pre="+pre;			
	} else {
		return false;
	}
}


function make_live(id, qVal, retID, tID, pre) {
	document.location.href = "make_live.php?id="+id+"&qVal="+qVal+"&return="+retID+"&tID="+tID+"&pre="+pre;
}



function IsPopupBlocker() {
	var oWin = window.open("","testpopupblocker","width=100,height=50,top=5000,left=5000");
	if (oWin==null || typeof(oWin)=="undefined") {
		return true;
	} else {
		oWin.close();
		return false;
	}
}


function PopupCenterWH(page, width, height) {
	  var top=(screen.height-height)/2;
	  var left=(screen.width-width)/2;
	  window.open(page,"bwwPWin","top="+top+",left="+left+",width="+width+",height="+height+","+"menubar=no,scrollbars=no,statusbar=no");
}

function PopupCenterWHS(page, width, height) {
	  var top=(screen.height-height)/2;
	  var left=(screen.width-width)/2;
	  window.open(page,"bwwPWin","top="+top+",left="+left+",width="+width+",height="+height+","+"menubar=no,scrollbars=yes,statusbar=no");
}

function PopupImgCenterWHS(page, width, height) {
	  var pIDStr = "&pID="+document.bwwForm.pID.value;
	  var top=(screen.height-height)/2;
	  var left=(screen.width-width)/2;
	  window.open(page+pIDStr,"bwwPWin","top="+top+",left="+left+",width="+width+",height="+height+","+"menubar=no,scrollbars=yes,statusbar=no");
}
//-->