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 header(page)
{
	var str="";
	str+="<div id='header'>";
	str+="	<div id='logo'><a href='index.php'><img src='images/logo.jpg'  width='436' height='62' border='0' title='NYC DATA SYSTEMS LLC' /></a></div>";
	str+="	<div id='top_rit'>";	
	str+="		<div id='top_links'>";
	str+="			<img src='images/icon_home.jpg' width='10' height='11' border='0' title='' style='margin:0 47px 0 0;' /> &nbsp; &nbsp; <img src='images/icon_contact.jpg' width='14' height='11' border='0' title='' style='margin:0 33px 0 0;' /> &nbsp; &nbsp; <img src='images/icon_sitemap.jpg' width='12' height='11' border='0' title='' style='margin:0 5px 0 0;' />";
	str+="			<a href='index.php'>Home</a> &nbsp; &nbsp; <a href='contact_us.php'>Contact Us</a> &nbsp; &nbsp; <a href='sitemap.html'>Sitemap</a>";
	str+="		</div>";
	str+="	</div>";
	str+="	<div class='clear'></div>";
	str+="	<div id='menu'>";
	if(page=='about')
		{ str+="<a href='about_us.html' style='margin-right:21px;' class='active'>ABOUT US</a>"; }
	else { str+="<a href='about_us.html' style='margin-right:21px;'>ABOUT US</a>"; }
	
	if(page=='testimonials')
		{ str+="<a href='testimonials.php' style='margin-right:21px;' class='active'>TESTIMONIALS</a>"; }
	else { str+="<a href='testimonials.php' style='margin-right:21px;'>TESTIMONIALS</a>"; }
	
	if(page=='portfolio')
		{ str+="<a href='portfolio.php' style='margin-right:21px;' class='active'>PORTFOLIO</a>"; }
	else { str+="<a href='portfolio.php' style='margin-right:21px;'>PORTFOLIO</a>"; }
	
	if(page=='webdesign')
		{ str+="<a href='website_design.html' style='margin-right:21px;' class='active'>WEBSITE DESIGN</a>"; }
	else { str+="<a href='website_design.html' style='margin-right:21px;'>WEBSITE DESIGN</a>"; }
	
	if(page=='seo')
		{ str+="<a href='seo.html' style='margin-right:21px;' class='active'>SEO</a>"; }
	else { str+="<a href='seo.html' style='margin-right:21px;'>SEO</a>"; }
	
	if(page=='news')
		{ str+="<a href='news.php' style='margin-right:21px;' class='active'>NEWS & EVENTS</a>"; }
	else { str+="<a href='news.php' style='margin-right:21px;'>NEWS & EVENTS</a>"; }
	
	if(page=='care_calenders')
		{ str+="<a href='care_calenders.html' style='margin-right:21px;' class='active'>CARE CALENDARS</a>"; }
	else { str+="<a href='care_calenders.html' style='margin-right:21px;'>CARE CALENDARS</a>"; }
	
	if(page=='bilingual_websites')
		{ str+="<a href='bilingual_websites.html' style='margin-right:21px;' class='active'>BI-LINGUAL WEBSITES</a>"; }
	else { str+="<a href='bilingual_websites.html' style='margin-right:21px;'>BI-LINGUAL WEBSITES</a>"; }
	
	if(page=='virtual_tour')
		{ str+="<a href='virtual_tours.html' class='active'>VIRTUAL TOURS</a>"; }
	else { str+="<a href='virtual_tours.html'>VIRTUAL TOURS</a>"; }
	str+="		</div>";
	str+="</div>";
	document.write(str);
}

	
function footer()
{
	var str="";
	str+="<div id='footer_lnk'>";
	str+="<p id='copyrit'>©2009-2011 NYC DATA SYSTEMS LLC, All Rights Reserved.</p>";
	str+="<a href='index.php'>Home</a> | <a href='about_us.html'>About Us</a> | <a href='testimonials.php'>Testimonials</a> | <a href='portfolio.php'>Portfolio</a> | <a href='website_design.html'>Website Design</a> | <a href='seo.html'>SEO</a> | <a href='virtual_tours.html'>Virtual Tours</a> | <a href='contact_us.php'>Contact Us</a>  <br>";
	str+="<a href='sitemap.html'>Sitemap</a> | <a href='news.php'>News & Events</a> | <a href='care_calenders.html'>Care Calendars</a> | <a href='bilingual_websites.html'>Bi-Lingual Websites</a> | <a href='privacy.html'>Privacy Policy</a> | <a href='terms.html'>Terms of Use</a>";
	str+="</div>";
	str+="<div style='width:970px; margin:0px auto; clear:both; border:0px solid red; padding:15px 0px 10px 0px;'><table cepadding='0' cellspacing='0' border='0'><tr><td width='404' align='right' style='padding:0px 10px 0px 0px;'><div style='background:url(images/btm_logo_bg.jpg) no-repeat top; width:152px; height:100px; padding:3px 4px 0px 0px;'><a href='http://mc.iwanet.org/' target='_blank'><img src='http://mc.iwanet.org/images/iwa4trans.gif' border='0' /></a></div></td><td width='206'><div style='border:3px double #ffffff;'><img src='images/nytech.jpg' border='0' height='75' width='200' title='NYTECH.ORG' alt='NYTECH.ORG' /></div></td><td width='350' alin='left' style='padding:0px 0px 0px 10px;' ><a href=' http://www.manhattancc.org' target='_blank'><img src=' http://www.manhattancc.org/logo/mcc.jpg' alt='Member of Manhattan Chamber of Commerce' height='110' width='81' border='0'></a></td></tr></table></div>";
	document.write(str);
}

function contact()
{
	var str="";
	str+="<div id='box8'>";
	str+="<img src='images/icon_mail.jpg' width='45' height='40' border='0' title='' align='top' style='float:right; margin:0 45px 12px 0;' />";
	str+="<h2 style='margin:12px 0 0px 8px;'>Quick Contact</h2>";
	str+="<p style='line-height:20px;'>";
	str+="<br /><b>NYC DATA SYSTEMS LLC </b>";
	str+="<br />244 Fifth Avenue, Suite A276";
	str+="<br />New York 10001 - USA"; 
	str+="</p>";	
	str+="<p style='margin-top:15px;  line-height:20px; ont-size:11px;'>";
	str+="<b>Toll free:</b> 	&nbsp; &nbsp;	(877) 317-6527";
	str+="<br /><b>Local:</b> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(718) 204-1317";
	str+="<br /><b>Fax:</b> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (718) 204-1317";
//	str+="<br /><b>Miami, FL :</b> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;	 (786) 270-1800";
//	str+="<br /><b>San Diego, CA :</b>	&nbsp;(619) 393-6681";
//	str+="<br /><b>Phoenix, AZ :</b>	&nbsp; &nbsp; &nbsp;(623) 321-3460";
//	str+="<br /><b>Chicago, IL :</b>	&nbsp; &nbsp; &nbsp; (312) 252-1815";
//	str+="<br /><b>Seattle, WA :</b>	&nbsp; &nbsp;&nbsp; (206) 203-6366";
	str+="</p>";	
	str+="<p style='margin-top:10px;'>";
	str+="<b>Email:</b> <a href='mailto:info@nycdatasystems.com'>info@nycdatasystems.com </a>";
	str+="<br /><b>Web:</b> <a href='http://www.nycdatasystems.com' target='_blank'>www.nycdatasystems.com</a>";
	str+="</p>";	
	str+="</div>";
	document.write(str);
}

function contact_form()
{
	var str="";
	str+="<div id='box9'>";
	str+="<form name='thisform' action='sendmail.php?mode=send' method='post' onSubmit='return fnValidate();'> ";
	str+="<p style='margin-top:10px;'>";
	str+="<input name='txtname' class='txtbox2' type='text' value='Name..'  onfocus=\"if(this.value!='') {this.value='';}\"    onblur=\"if(this.value==''){this.value='Name..';}\" style='margin:10px 0 0 0;' />";
	str+="<br /><input name='txtemail' class='txtbox2' type='text' value='Email Address..'  onfocus=\"if(this.value!='') {this.value='';}\"    onblur=\"if(this.value==''){this.value='Email Address..';}\" style='margin:16px 0 0 0;' />";
	str+="<br /><textarea name='txtcomments' cols='' class='txtarea' style='margin:16px 0 0 0;' rows='' onfocus=\"if(this.value!='') {this.value='';}\"    onblur=\"if(this.value==''){this.value='Message..';}\">Message..</textarea>";
	str+="<input name='' type='reset' class='btn_reset' value='' style='margin:16px 0px 0 0; float:right;' />";
	str+="<br /><input name='' type='image' src='images/btn_send.jpg' value='send' style='margin:16px 0 0 0;' />";
	str+="</p>";		
	str+="</form>";		
	str+="</div>";
	document.write(str);
}

function footer_pad()
{
	var str="";
	str+="<script type='text/javascript'>contact_form();</script>";
	str+="<img src='images/img_divider.gif' width='2' height='259' border='0' title='' style='float:right; margin:24px 35px 0 0;' />";
	str+="<script type='text/javascript'>contact();</script>";
	str+="<img src='images/img_divider.gif' width='2' height='259' border='0' title='' style='float:right; margin:24px 40px 0 0;' />";
	str+="<div id='box7'>";
	str+="<img src='images/icon_get_social.jpg' width='51' height='52' border='0' title='' align='top' style='float:right; margin:0 80px 0px 0;' />";
	str+="<h2 style='margin-top:15px;'>Get Social</h2>"; 
	str+="<br><div class='getsocial'>";
	str+="<a href='http://www.facebook.com/NYCDATASYSTEMS' target='_blank'><img src='images/icons_social_sites-01.jpg' width='63' height='62' border='0' title='' /></a><a href='http://twitter.com/nyc_datasystems' target='_blank'><img src='images/icons_social_sites-02.jpg' width='64' height='62' border='0' title='' /></a><a href='http://groups.google.com/group/nyc-data-systems-llc' target='_blank'><img src='images/icons_social_sites-03.jpg' width='64' height='62' border='0' title='' /></a><a href='http://www.linkedin.com/in/nycdatasystems' target='_blank'><img src='images/icons_social_sites-04.jpg' width='64' height='64' border='0' title='' /></a><a href='http://www.myspace.com/nycdatasystems' target='_blank'><img src='images/icons_social_sites-05.jpg' width='64' height='65' border='0' title='' /></a><a href=' http://picasaweb.google.com/nycdatasystems' target='_blank'><img src='images/icons_social_sites-06.jpg' width='64' height='65' border='0' title='' /></a>";
	str+="<a href=' http://www.orkut.com/Main#Profile?uid=17849707607197070049' target='_blank'><img src='images/icons_social_sites-07.jpg' width='64' height='65' border='0' title='' /></a><a href='http://www.flickr.com/people/nycdatasystems/' target='_blank'><img src='images/icons_social_sites-08.jpg' width='64' height='65' border='0' title='' /></a>";	
	str+="</div>";
	str+="<div align='center' style='border:0px solid red; padding:10px 0px 10px 0px;'>&nbsp;</div>";
//	str+="<div id='newsletter_pad'><div id='newsletter'>";
//	str+="<p>";
//	str+="<input name='Name' class='txtbox_nl' type='text' style='margin:10px 0 0 0;' />";
//	str+="<input name='' type='image' src='images/btn_subscribe.jpg' style='margin:12px 0 0 0;' />";
//	str+="</p>";
//	str+="</div></div>";					
	str+="</div>";
	str+="<map name='Map' id='Map'>";
	str+="<area shape='circle' coords='31,27,24' href='#' /><area shape='circle' coords='99,29,26' href='#' />";
	str+="<area shape='circle' coords='161,28,24' href='#' />";
	str+="<area shape='circle' coords='224,27,25' href='#' />";
	str+="<area shape='circle' coords='27,99,24' href='#' />";
	str+="<area shape='circle' coords='101,96,23' href='#' />";
	str+="<area shape='circle' coords='161,97,21' href='#' />";
	str+="<area shape='circle' coords='226,99,23' href='#' />";
	str+="</map>";
	document.write(str);
}

function fnValidate()
{
	if(document.thisform.txtname.value=="Name.."){
	  document.thisform.txtname.value=""; 
	}
   	if(isNull(document.thisform.txtname,"Name")) return false;
	if(document.thisform.txtname.value=="Email Address.."){
	  document.thisform.txtname.value=""; 
	}
	if(isNull(document.thisform.txtemail,"Email")) return false;
		if(notEmail(document.thisform.txtemail,"Email")) return false;
	/*	
	if(isTxtarea(document.thisform.txtcomments.value=="Message..")){
	  isTxtarea(document.thisform.txtcomments.value=""; )
	}
	*/
	if(document.thisform.txtcomments.value=="Message.."){
	  document.thisform.txtcomments.value=""; 
	}
	if(isTxtareaNull(document.thisform.txtcomments,"Message")){ return false; }
	
}

function fnfeedbackValidate()
{
	
   	if(isNull(document.thisfeedbackform.name,"Name")) return false;	
	if(isNull(document.thisfeedbackform.email,"Email")) return false;
		if(notEmail(document.thisfeedbackform.email,"Email")) return false;	
	if(isTxtareaNull(document.thisfeedbackform.comments,"Message")){ return false; }
	
}
function fnNewsletterValidate(){
	if(isNull(document.newsForm.txtNewsLetter,"your Email" )){ return false; }
	if(notEmail(document.newsForm.txtNewsLetter,"Email" )){ return false; }
}
function fnNewsletterright(){
	var str="";
	str+='<form name="newsForm" action="sendmail.php?mode=news" onsubmit="return fnNewsletterValidate();" method="post" >';
	str+='<br /><div style="border-bottom:1px dotted  #3399CC;"></div>';
	str+='<br /><img src="images/icon_in_NL.png" width="40" height="61" border="0" title="" style="float:left; margin:0 12px 15px 0;"  />';
	str+='<p><strong>Newsletter Signup</strong></p>';
	str+='	<p style="padding:10px 0 6px 0; font-size:11px;"><input name="txtNewsLetter" type="text" class="txtbox3" /></p>';
	str+='	<p style="padding-top:6px;"><input name="" type="image" src="images/btn_subsribe1.png" /></p>';
	str+='	<br /><br /><div style="border-bottom:1px dotted  #3399CC;"></div>';
	str+='</form>';
	document.write(str);
}
