function checkme() {
missinginfo = "";
if (!document.form.agree.checked) {
missinginfo += "\n You must accept the terms and conditions!";
}
if (missinginfo != "") {
missinginfo ="\n" +
"\n" +
missinginfo + "\n" +
"\n";
alert(missinginfo);
return false;
}
else {
return true;
}
}

function load() {
var load = window.open('imarg/sample_large.gif','','scrollbars=no, menubar=no,width=480 height=309 border=0,resizable=no,toolbar=no,location=no,status=no');
}

function Form1_Validator(theForm)
{
  	if (theForm.postcode.value == "")
  {
    alert("A  \"postcode\" is required!");
    theForm.postcode.focus();
    return (false);
  }
  	if (theForm.area.value == "")

  {
    alert("Please select your \"Area\"!");
    theForm.notes.focus();
    return (false);
	}
	 if (theForm.notes.value == "")

  {
    alert("\"Notes\" cannot be empty!");
    theForm.notes.focus();
    return (false);
	}
}


function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}
//->
function PreviewText()
{

  var generator=window.open('','preview','height=400,width=638');

  generator.document.write('<html><head><title>Preview text</title>');
  generator.document.write('</head><body>');
  generator.document.write(document.forms[0].FCKeditor1.value);
  generator.document.write('</body></html>');
  generator.document.close();

}


function extPreview(FCKeditor1) { 
FCKeditorAPI.GetInstance('FCKeditor1').Commands.GetCommand('Preview').Execute(); 
} 


function showHide(elementid){
if (document.getElementById(elementid).style.display == 'none'){
document.getElementById(elementid).style.display = '';
} else {
document.getElementById(elementid).style.display = 'none';
}
} 



var count = "800";   
function limiter(){
var tex = document.comm.comms.value;
var len = tex.length;
if(len > count){
        tex = tex.substring(0,count);
        document.comm.comms.value =tex;
        return false;
}
document.comm.limit.value = count-len;
}
var tgs = new Array( 'div','p');


var szs = new Array( 'xx-small','x-small','small','medium','large','x-large','xx-large' );
var startSz = 2;

function ts( trgt,inc ) {
	if (!document.getElementById) return
	var d = document,cEl = null,sz = startSz,i,j,cTags;
	
	sz += inc;
	if ( sz < 0 ) sz = 0;
	if ( sz > 6 ) sz = 6;
	startSz = sz;
		
	if ( !( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];

	cEl.style.fontSize = szs[ sz ];

	for ( i = 0 ; i < tgs.length ; i++ ) {
		cTags = cEl.getElementsByTagName( tgs[ i ] );
		for ( j = 0 ; j < cTags.length ; j++ ) cTags[ j ].style.fontSize = szs[ sz ];
	}
}
function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
 var anchor = anchors[i];
 if (
 anchor.getAttribute("href") && (
 anchor.getAttribute("rel") == "external" ||
 anchor.getAttribute("rel") == "external nofollow" ||
 anchor.getAttribute("rel") == "nofollow" )
 )
 anchor.target = "_blank";
 }
}
window.onload = function() {
externalLinks();
}

function MM_openBrWindow(theURL,winName,features) { 
window.open(theURL,winName,features);
}
function verify(ver){
		
		if(ver){
			
			document.location.href = 'remove_listing.php';
		}else{
			
		}
	}
	function verify2(ver) {
		if(ver){
		
			document.location.href = 'remove_acc.php';
		}else{
			
		}
	}

function display(obj,id1) {
txt = obj.options[obj.selectedIndex].value;
document.getElementById(id1).style.display = 'none';
if ( txt.match(id1) ) {
document.getElementById(id1).style.display = 'block';
}
}
