

function showcont()
{
	document.getElementById("addcont").style.display = '';
	document.getElementById("showcontadd").innerHTML = '<a href="javascript:void(0);" onClick="return hidecont();">Add A New A Video</a>';
	for (var x = 1; x <= row; x++)
	{
		var id1 = "m__country_name_"+x;
		var title = "titlecont"+x
		document.getElementById("contnametext"+x).innerHTML = '<input type="text" name="'+title+'" id="'+id1+'" onBlur="return checkcont(\'country\',\''+id1+'\','+x+');"/>';	
	}
}
function hidecont()
{
	document.getElementById("addcont").style.display = 'none';
	document.getElementById("showcontadd").innerHTML = '<a href="javascript:void(0);" onClick="return showcont();">Add A New A Video</a>';	
	for (var x = 1; x <= row; x++)
	{
		var title = "titlecont"+x
		document.getElementById("contnametext"+x).innerHTML = '<input type="text" name="'+title+'" onBlur="return checkcont(\'country\',\''+id1+'\','+x+');"/>';	
	}
}






function newpage()

{

var zip=document.getElementById('zip').value;
document.location.href="passnext.php?action=setuserstate&class=enhance&dc=yes&location="+zip;

}
function check2()
{

var str;
 str= "<table width='560px' height='26px' border='0' cellspacing='0' cellpadding='0'><tr><td   id='td1' align='center' valign='middle'><a href='#'  onclick=\'check1()\' class='text2'>Auto repair</a></td><td  id='td2'  class='yes'   align='center' valign='middle'><a href='#'   onclick=\'check1()\' class='text5'>Child care</a></td><td align='center' valign='middle'><a href='#' class='text5'>Doctors</a></td><td align='center' valign='middle'><a href='#' class='text5'>Hair Salons</a></td><td align='center' valign='middle'><a href='#' class='text5'>Land scapers </a></td><td align='center' valign='middle'><a href='#' class='text5'>Maids</a></td><td align='center' valign='middle'><a href='#' class='text5'>Restaurants</a></td><td align='center' valign='middle'><a href='#' class='text5'>All</a></td></tr></table>";
document.getElementById('change').innerHTML= str;
}
function hideChoose () {
     document.getElementById("choose1").style.display = "inline";
     document.getElementById("choose2").style.display = "none";
     hideObj("chooseLoc");
}

//code to slide div's off the page
function hideObj (obj) {
     var newObj = document.getElementById(obj).cloneNode(true);
     newObj.setAttribute('id', 'hideObj');
     var container = document.getElementById(obj).parentNode;
     var objHeight = document.getElementById(obj).offsetHeight;
     document.getElementById(obj).style.display="none";
     container.insertBefore(newObj,document.getElementById(obj));
     setTimeout('hideProc("hideObj",' + objHeight + ')', 10);
}

function hideProc (obj, objHeight) {
   objHeight = objHeight - 15;
   document.getElementById(obj).style.height = objHeight + 'px';
   if (objHeight > 15) {
     setTimeout('hideProc ("' + obj + '",' + objHeight + ')', 10);
   }
   else {
     document.getElementById(obj).parentNode.removeChild(document.getElementById(obj));
   }
}

function showChoose () {
     document.getElementById("choose1").style.display = "none";
     document.getElementById("choose2").style.display = "inline";
     showObj("chooseLoc");
}

function showObj (obj) {
     var newObj = document.getElementById(obj).cloneNode(true);
     newObj.setAttribute('id', 'tempObj');
     var container = document.getElementById(obj).parentNode;
     container.appendChild(newObj);
     newObj.style.display="block";
     var objHeight = newObj.offsetHeight;
     newObj.style.height="0px";
     var showObj = newObj.cloneNode(true);
     document.getElementById(obj).setAttribute('id', obj+'Old');
     showObj.setAttribute('id', obj);
     container.insertBefore(showObj, document.getElementById(obj+'Old'));
     container.removeChild(document.getElementById(obj+'Old'));
     container.removeChild(newObj);

     setTimeout('showProc("' + obj + '", 0, ' + objHeight + ')', 10);
}

function showProc (obj, currentHeight, objHeight) {
   currentHeight = currentHeight + 15;
   document.getElementById(obj).style.height = currentHeight + 'px';
   if (currentHeight + 15 < objHeight) {
     setTimeout('showProc ("' + obj + '",' + currentHeight + ',' + objHeight + ')', 10);
   }
   else {
     document.getElementById(obj).style.height = objHeight + 'px';
   }
}


