function msg()
{
return true;
};

function areacode(myfield,e)
{
	 var keycode;
  if (window.event) keycode=window.event.keycode;
  else 
    if (e) keycode=e.which;
    else return true;

if ((document.register.billtophone2.value.length==0) && (document.register.billtophone.value.length==3))
  if (keycode!=9) {
    document.register.billtophone2.focus();
		}
return false;
}

function locale(myfield,e){
		  var keycode;
  if (window.event) keycode=window.event.keycode;
  else 
    if (e) keycode=e.which;
    else return true;

if ((document.register.billtophone3.value.length==0) && (document.register.billtophone2.value.length==3)&&(keycode!=9))
  {document.register.billtophone3.focus();}
return false;
}
function ext(myfield,e){
if ((document.register.billtophone3.value.length==0) && (document.register.billtophone2.value.length==0))
  {document.register.billtophone2.focus();}
}
function ext2(myfield,e){
if (document.register.billtophone3.value.length==0)
  {document.register.billtophone3.focus();}
}
// Pop Up Find on this page Javascript
// copyright 8th July 2003, by Stephen Chapman, Felgall Pty Ltd

// permission is granted to use this javascript provided that the code
// and comments are not altered

  var nm = 0; 
  var here = ""; 
  if (opener != null) {here = opener.location.href; var isLayers = 0; var isAll = 0; var isID = 0; 
		if (document.all) {isAll = 1;} else if (document.getElementById) {isID = 1;}
		else { browserVersion = parseInt(navigator.appVersion); 
		if ((navigator.appName.indexOf("Netscape") != -1) && (browserVersion == 4)) {isLayers = 1;}}
}
function findInPage(str) {
 	if (opener.closed) {alert("Unable to find as the main window has been closed."); self.close(); return false;} 
	 else if (here != opener.location.href) {here = opener.location.href; nm = 0;} 
		
		if (str == "") {alert("Please enter the text you want to locate."); return false;} 
		
		var tx, i, found; 
		if (isLayers) {
    if (!opener.find(str)) 
				  while(opener.find(str,false,true)) n++; 
				else n++;

    if (n == 0) alert(str + " not found on this page.");  } 
				else if (isAll) {
       tx = opener.document.body.createTextRange(); 
							for (i = 0; i <= nm && (found = tx.findText(str)) != false; i++) {
							  tx.moveStart("character", 1); tx.moveEnd("textedit");
							}
							
							if (found) {tx.moveStart("character", -1); tx.findText(str);tx.select(); tx.scrollIntoView(); nm++;}
							else {if (nm > 0) {nm = 0; findInPage(str);}
             else alert(str + " not found on this page.");
												}
				} 
				else if (isID) {
           var ag = navigator.userAgent.toLowerCase();
											var isG = (ag.indexOf('gecko') != -1); 
											var isR=0;if (isG) {t = ag.split("rv:"); isR = parseFloat(t[1]);}
											if (isR >=1) {
             if (!opener.find(str,false,false,true,false,true,false)) 
								  			  alert(str + " not found on this page.");document.search.sub.focus();
	   }else  alert("Find function not supported on this browser");
  } 
		return false;
} 
													
function mnWin() {
	  if (opener.closed) {
				  alert("Main window has been closed."); self.close();
			} 
			else {opener.focus(); locatorWin();}
}

function findBody() {
	  document.write('<form name="search" onsubmit="return findInPage(this.string.value);">');
			document.write('<input name="string" type="text" size="22" onchange="nm = 0;">');
			document.write('<input name="sub" type="submit" value="Find"></form>');
}


// Pop Up Find on this page Javascript
// copyright 28th January 2003, by Stephen Chapman, Felgall Pty Ltd

// permission is granted to use this javascript provided that the code
// and comments are not altered

function locatorWin() {var lwin = window.open('locwin.htm','findit','height=100,width=250,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'); lwin.moveTo(0,0); lwin.focus();}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
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 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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null) {
						document.MM_sr[j++]=x; 
	   		if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];
			}
}

function writit(text,id,imglink)
{
	if (document.getElementById)
	{
		x = document.getElementById(id);
		x.innerHTML = '';
		x.innerHTML = text + " <a href='javascript:poptastic(\"view_image.php?img="+imglink+"\")'>(view larger)</a>";
	}
	else if (document.all)
	{
		x = document.all[id];
		x.innerHTML = text;
	}
	else if (document.layers)
	{
		x = document.layers[id];
		text2 = '<P CLASS="testclass">' + text + '</P>';
		x.document.open();
		x.document.write(text2);
		x.document.close();
	}
}

var newwindow;

function poptastic(url)
{
	newwindow=window.open(url,'name','height=550,width=650');
	if (window.focus) {newwindow.focus()}
}
function poptastic_video(url)
{
	newwindow=window.open(url,'name','height=300,width=340');
	if (window.focus) {newwindow.focus()}
}
function poptastic_videoHD(url)
{
	newwindow=window.open(url,'name','height=285,width=500');
	if (window.focus) {newwindow.focus()}
}
