function sf(){
document.f.query.focus();
}

/* Google Analytics Start */
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-2828983-25']);
  _gaq.push(['_setDomainName', '.christianpost.com']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
/* Google Analytics End */

function myfunc()
{
	var url;
	var Type=document.f.Type.options[document.f.Type.selectedIndex].value;
	
	if(Type==1)
		url="http://www.google.com/custom?q=" + document.f.query.value+"&client=pub-7576668947679255&forid=1&channel=5211184426&ie=ISO-8859-1&oe=ISO-8859-1&safe=active&cof=GALT%3A%23008000%3BGL%3A1%3BDIV%3A%23336699%3BVLC%3A663399%3BAH%3Acenter%3BBGC%3AFFFFFF%3BLBGC%3AFFFFFF%3BALC%3A0000FF%3BLC%3A0000FF%3BT%3A000000%3BGFNT%3A0000FF%3BGIMP%3A0000FF%3BLH%3A46%3BLW%3A381%3BL%3Ahttp%3A%2F%2Fwww.crossmap.com%2Fimages%2Flogo.gif%3BS%3Ahttp%3A%2F%2Fwww.crossmap.com%3BFORID%3A1%3B&hl=en";
	else if(Type==2)
		url="http://search.crossmap.com/?Search=" + document.f.query.value;
	else if(Type==3)
		url="http://store.crossmap.com/search.htm?type=title&search=" + document.f.query.value;
	else if(Type==4)
		url="http://clipart.crossmap.com/search_keyword.htm?category=&query="+ document.f.query.value;
	else if(Type==5)
		url="http://rss.crossmap.com/search.htm?search_query="+ document.f.query.value;	

	document.location.href=url;
	return false;
}


function myfunc2()
{
	//alert("here");
	var url;
	var Type=document.forms['f'].elements['type'].value;
	if(Type==1)
		//url="http://www.google.com/custom?q=" + document.f.query.value+"&client=pub-7576668947679255&forid=1&channel=5211184426&ie=ISO-8859-1&oe=ISO-8859-1&safe=active&cof=GALT%3A%23008000%3BGL%3A1%3BDIV%3A%23336699%3BVLC%3A663399%3BAH%3Acenter%3BBGC%3AFFFFFF%3BLBGC%3AFFFFFF%3BALC%3A0000FF%3BLC%3A0000FF%3BT%3A000000%3BGFNT%3A0000FF%3BGIMP%3A0000FF%3BLH%3A46%3BLW%3A381%3BL%3Ahttp%3A%2F%2Fwww.crossmap.com%2Fimages%2Flogo.gif%3BS%3Ahttp%3A%2F%2Fwww.crossmap.com%3BFORID%3A1%3B&hl=en";
		url="http://biz.crossmap.com/?Search=" + document.f.query.value
	else if(Type==2)
		url="http://search.crossmap.com/?Search=" + document.f.query.value;
	else if(Type==3)
		url="http://store.crossmap.com/search.htm?type=title&search=" + document.f.query.value;
	else if(Type==4)
		url="http://clipart.crossmap.com/search_keyword.htm?category=&query="+ document.f.query.value;
	else if(Type==5)
		url="http://rss.crossmap.com/search.htm?search_query="+ document.f.query.value;	

	document.write('<me'+'ta http-equi'+'v="refresh" content="0;'+'url=http://www.crossmap.com/index2009_yue.htm">');
	window.location.href=url;
//	return false;
}


var bookmarkurl="http://www.crossmap.com"
var bookmarktitle="Crossmap.com Christian Search"

function addbookmark(){
  if (document.all)
     window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  if (restore) selObj.selectedIndex=0;
}

function searchIn(){
	var url;
	var Type=document.forms['f'].elements['type'].value;
	if(Type==1)
		url="http://biz.crossmap.com/search.htm?search_query=" + document.f.query.value + "&Submit=Search";
	else if(Type==2)
		url="http://search.crossmap.com/?Search=" + document.f.query.value;
	//else if(Type==3)
	//	url="http://store.crossmap.com/search.htm?type=title&search=" + document.f.query.value;
	else if(Type==3)
		url="http://arts.crossmap.com/index.htm?term="+ document.f.query.value + "&item=allimage&x=0&y=0";
	else if(Type==4)
		url="http://rss.crossmap.com/search.htm?search_query="+ document.f.query.value;	

	document.write('<me'+'ta http-equi'+'v="refresh" content="0;'+'url=http://www.crossmap.com/index.htm">');
	window.location.href=url;
}

function searchBar(num){
	for(var i=1;i<=5;i++){
		if(i==num){
			document.getElementById("search"+i).className = "searchMenuSelected"
			document.forms['f'].elements['type'].value = num;
			if(i==1) document.getElementById("search"+i).innerHTML = "Business";
			if(i==2) document.getElementById("search"+i).innerHTML = "Web";
			//if(i==3) document.getElementById("search"+i).innerHTML = "Shopping";
			if(i==3) document.getElementById("search"+i).innerHTML = "Images";
			if(i==4) document.getElementById("search"+i).innerHTML = "News";
		}else{
			document.getElementById("search"+i).className = "";
			if(i==1) document.getElementById("search"+i).innerHTML = '<a href="javascript:searchBar(1)">Business</a></span>';
			if(i==2) document.getElementById("search"+i).innerHTML = '<a href="javascript:searchBar(2)">Web</a>';
			//if(i==3) document.getElementById("search"+i).innerHTML = '<a href="javascript:searchBar(3)">Shopping</a></span>';
			if(i==3) document.getElementById("search"+i).innerHTML = '<a href="javascript:searchBar(3)">Images</a>';
			if(i==4) document.getElementById("search"+i).innerHTML = '<a href="javascript:searchBar(4)">News</a></span>';
		}
	}
	document.forms['f'].elements['query'].focus();
}

document.write('<script a ><\/script>');
