// JavaScript Document

 


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_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_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 goto_URL(object) {
window.location.href =  object.options[object.selectedIndex].value;
}


function openDefWin(theURL) { //v2.0
defWin = window.open(theURL,"defWin","scrollbars=yes,width=300,height=250,screenX=30,screenY=70,left=30,top=70");
}

function openSearchWin(theURL) { //v2.0
searchWin = window.open(theURL,"searchWin","scrollbars=yes,width=550,height=475,screenX=0,screenY=0,left=0,top=0");
}

function openCompareWin(theURL) { //v2.0
compareWin = window.open(theURL,"compareWin","scrollbars=yes,resizable=yes,width=780,height=380,screenX=0,screenY=0,left=0,top=0");
}

function feedbackVal()
{
    var error_string = "";
    // check the feedback field
    if (window.document.form1.feedback.value == "")
    {
        error_string += "You forgot to include your feedback!";
    }

    if (error_string == "")
    {
	   return true;
	   
    } else {
        error_string = error_string;
        alert(error_string);
        return false;
    } 
}


function LaunchCompare1()
{


var idlist;
idlist = document.form1.p1.value + ',' + document.form1.p2.value + ',' + document.form1.p3.value+ ',' + document.form1.p4.value+ ',' + document.form1.p5.value;
if (idlist == "0,0,0,0,0") 
	alert("Please select at least one product in order to view expaneded information.");
 else 
		openCompareWin('comparison-table.asp?IDList=' + idlist);
}

function LaunchCompare2()
{
var idlist="";
var comma="";
for (i=0; i < document.form1.chkProduct.length; i++) {
	if (document.form1.chkProduct[i].checked) {
		idlist += comma + document.form1.chkProduct[i].value;
		if (comma == "") comma = ",";
	}
}
if (idlist == "")
	alert ("Please check at least one product in order to view expanded information.")
else
	openCompareWin('comparison-table-rec.asp?IDList=' + idlist);
//idlist = form1.p1.value + ',' + form1.p2.value + ',' + form1.p3.value+ ',' + form1.p4.value+ ',' + form1.p5.value;
//openCompareWin('comparison-table.asp?IDList=' + idlist);
}

function dsVal()
{
    var error_string = "";
    // check the product number field
    if (window.document.form1.productnumber.value == "")
    {
        error_string += "You must type in all or part of a product number\n";
    }

    if (error_string == "")
    {
	   return true;
	   
    } else {
        error_string = error_string;
        alert(error_string);
        return false;
    } 
}


function evalkitVal()
{
    var error_string = "";
    // check the first name field
    if (window.document.theForm.client_name.value == "")
    {
        error_string += "You must enter your name.\n";
    }

 // check the company field
    if (window.document.theForm.client_company.value == "")
    {
        error_string += "You must enter your company name.\n";
    }

// check the phone field
    if (window.document.theForm.client_phone.value == "")
    {
        error_string += "You must enter your phone number.\n";
    }

// check the email field
    if (window.document.theForm.client_email.value == "")
    {
        error_string += "You must enter a valid email address.\n";
    }

// check the product number field
    if (window.document.theForm.product_kit.value == "")
    {
        error_string += "You must enter a product number.\n";
    }

    if (error_string == "")
    {
	   if (confirm("You have entered the following email address as the address \n" + "at which you would like to be contacted: \n\n" + window.document.theForm.client_email.value + "\n\n" + "If the address is correct, please click \"OK\".\n\n" + "If not, click \"cancel\" and make the necessary corrections."))
		{
		return true;
		} else {
		return false;
		}

	   
    } else {
        error_string = "We found the following ommisions in your form submission: \n\n" + error_string;
        alert(error_string);
        return false;
    } 
}

function tellusVal()
{
    var error_string = "";
    // check the first name field
    if (window.document.theForm.client_name.value == "")
    {
        error_string += "You must enter your name.\n";
    }

 // check the company field
    if (window.document.theForm.client_company.value == "")
    {
        error_string += "You must enter your company name.\n";
    }

// check the phone field
    if (window.document.theForm.client_phone.value == "")
    {
        error_string += "You must enter your phone number.\n";
    }

// check the email field
    if (window.document.theForm.client_email.value == "")
    {
        error_string += "You must enter a valid email address.\n";
    }

// check the product description field
    if (window.document.theForm.feedback.value == "")
    {
        error_string += "You forgot to tell us about your application.\n";
    }

    if (error_string == "")
    {
	   if (confirm("You have entered the following email address as the address \n" + "at which you would like to be contacted: \n\n" + window.document.theForm.client_email.value + "\n\n" + "If the address is correct, please click \"OK\".\n\n" + "If not, click \"cancel\" and make the necessary corrections."))
		{
		return true;
		} else {
		return false;
		}
	   
    } else {
        error_string = "We found the following ommisions in your form submission: \n\n" + error_string;
        alert(error_string);
        return false;
    } 
}

var displayLeftPhoto = "";
if (window.location.href.indexOf('practice') != -1) {
displayLeftPhoto = '<img src="images/photo-areas.jpg" alt="" width="298" height="209" />';
}
else if (window.location.href.indexOf('profiles') != -1) {
displayLeftPhoto = '<img src="images/photo-profiles.jpg" alt="" width="298" height="209" />';
}

else if (window.location.href.indexOf('resources') != -1) {
displayLeftPhoto = '<img src="images/photo-resources.jpg" alt="" width="298" height="209" />';
}
else if (window.location.href.indexOf('contact') != -1) {
displayLeftPhoto = '<img src="images/photo-contact.jpg" alt="" width="298" height="209" />';
}

var displayHeading = "";
if (window.location.href.indexOf('practice') != -1) {
displayHeading = '<img src="images/subhead-areas.gif" alt="" width="374" height="67" />';
}
else if (window.location.href.indexOf('profiles') != -1) {
displayHeading = '<img src="images/subhead-profiles.gif" alt="" width="374" height="67" />';
}

else if (window.location.href.indexOf('resources') != -1) {
displayHeading = '<img src="images/subhead-resources.gif" alt="" width="374" height="67" />';
}
else if (window.location.href.indexOf('contact') != -1) {
displayHeading = '<img src="images/subhead-contact.gif" alt="" width="374" height="67" />';
}

var displaySubnav = "";
if (window.location.href.indexOf('practice') != -1) {
displaySubnav = "<a href=practice-pub.html><img src=images/sublink-areas1.gif alt=Publishing and Media Law name=sublink1 width=298 height=46 border=0 id=sublink1 onmouseover=MM_swapImage('sublink1','','images/sublink-areas1-over.gif',1) onmouseout=MM_swapImgRestore() /></a><br /><a href=practice-copy.html><img src=images/sublink-areas2.gif alt=Copyright Law name=sublink2 width=298 height=30 border=0 id=sublink2 onmouseover=MM_swapImage('sublink2','','images/sublink-areas2-over.gif',1) onmouseout=MM_swapImgRestore() /></a><br /><a href=practice-trade.html><img src=images/sublink-areas3.gif alt=Trademark Law name=sublink3 width=298 height=31 border=0 id=sublink3 onmouseover=MM_swapImage('sublink3','','images/sublink-areas3-over.gif',1) onmouseout=MM_swapImgRestore() /></a><br /><a href=practice-edu.html><img src=images/sublink-areas4.gif alt=Higher Education name=sublink4 width=298 height=32 border=0 id=sublink4 onmouseover=MM_swapImage('sublink4','','images/sublink-areas4-over.gif',1) onmouseout=MM_swapImgRestore() /></a><br /><a href=practice-clients.html><img src=images/sublink-areas5.gif alt=Representative Clients name=sublink5 width=298 height=32 border=0 id=sublink5 onmouseover=MM_swapImage('sublink5','','images/sublink-areas5-over.gif',1) onmouseout=MM_swapImgRestore() /></a>";
}
else if (window.location.href.indexOf('profiles') != -1) {
displaySubnav = "<a href=profiles-rubin.html><img src=images/sublink-profiles1.gif alt=Zick Rubin name=sublink1 width=298 height=46 border=0 id=sublink1 onmouseover=MM_swapImage('sublink1','','images/sublink-profiles1-over.gif',1) onmouseout=MM_swapImgRestore() /></a><br /><a href=profiles-ulrich.html><img src=images/sublink-profiles2.gif alt=Brenda Ulrich name=sublink2 width=298 height=30 border=0 id=sublink2 onmouseover=MM_swapImage('sublink2','','images/sublink-profiles2-over.gif',1) onmouseout=MM_swapImgRestore() /></a><br /><a href=profiles-nelson.html><img src=images/sublink-profiles3.gif alt=Patricia Nelson name=sublink3 width=298 height=31 border=0 id=sublink3 onmouseover=MM_swapImage('sublink3','','images/sublink-profiles3-over.gif',1) onmouseout=MM_swapImgRestore() /></a><br /><a href=profiles-yee.html><img src=images/sublink-profiles4.gif alt=Lucia Cheng Yee name=sublink4 width=298 height=32 border=0 id=sublink4 onmouseover=MM_swapImage('sublink4','','images/sublink-profiles4-over.gif',1) onmouseout=MM_swapImgRestore() /></a><br /><a href=profiles-lawstudents.html><img src=images/sublink-profiles5.gif alt=Law Students name=sublink5 width=298 height=32 border=0 id=sublink5 onmouseover=MM_swapImage('sublink5','','images/sublink-profiles5-over.gif',1) onmouseout=MM_swapImgRestore() /></a>";
}

else if (window.location.href.indexOf('resources') != -1) {
displaySubnav = "<a href=resources-links.html><img src=images/sublink-resources1.gif alt=Links name=sublink1 width=298 height=46 border=0 id=sublink1 onmouseover=MM_swapImage('sublink1','','images/sublink-resources1-over.gif',1) onmouseout=MM_swapImgRestore() /></a><br /><a href=resources-memos.html><img src=images/sublink-resources2.gif alt=Firm Memos name=sublink2 width=298 height=30 border=0 id=sublink2 onmouseover=MM_swapImage('sublink2','','images/sublink-resources2-over.gif',1) onmouseout=MM_swapImgRestore() /></a><br /><a href=resources-column.html><img src=images/sublink-resources3.gif alt=Really Legal Column name=sublink3 width=298 height=30 border=0 id=sublink3 onmouseover=MM_swapImage('sublink3','','images/sublink-resources3-over.gif',1) onmouseout=MM_swapImgRestore() /></a>";
}
else if (window.location.href.indexOf('contact') != -1) {
displaySubnav = "<a href=contact-contact.html><img src=images/sublink-contact1.gif alt=Contact Info name=sublink1 width=298 height=46 border=0 id=sublink1 onmouseover=MM_swapImage('sublink1','','images/sublink-contact1-over.gif',1) onmouseout=MM_swapImgRestore() /></a><br /><a href=contact-directions.html><img src=images/sublink-contact2.gif alt=Directions name=sublink2 width=298 height=30 border=0 id=sublink2 onmouseover=MM_swapImage('sublink2','','images/sublink-contact2-over.gif',1) onmouseout=MM_swapImgRestore() /></a>";
}

function emailDisclaimer()
{
	var disclaimer='Thank you for reaching out to contact The Law Office of Zick Rubin. Before you send your message, we wanted to make sure you are aware of the following. Please do not send any confidential information in response to this link. Sending an e-mail to The Law Office of Zick Rubin does not give rise to an attorney-client relationship, and will not be deemed to disqualify The Law Office of Zick Rubin from undertaking any engagement for a current or future client.  Before any attorney-client engagement may be formed, The Law Office of Zick Rubin will need to check for possible conflicts of interest, you will need to consider whether you wish to retain The Law Office of Zick Rubin as counsel, and we will need to consider whether we wish to accept the potential engagement. In the meantime, The Law Office of Zick Rubin reserves the right to represent parties with interests adverse to you.';

	alert(disclaimer);
	return true;
}