var burl = "http://www.ohioshaman.com/_templates/users/default/_img";
var siteurl = "http://www.ohioshaman.com";
var s_username = "";
var tb_pathToImage = "http://www.ohioshaman.com/_script/loadingAnimation.gif";
//AJAX FUNCTIONS
var http = false;
if(navigator.appName == "Microsoft Internet Explorer") 
{
  http = new ActiveXObject("Microsoft.XMLHTTP");
} 
else 
{
  http = new XMLHttpRequest();
}

function closecomm()
{
	document.getElementById("commx").style.display = "none";
}

var timec;
//Send Comment
function sendComment(types,mid)
{
	var text = document.getElementById("ctext").value;				
	if (http.readyState == 4 || http.readyState == 0) 
	{
		http.open("POST", siteurl + "/_ajax/send_comment.php", true);
		http.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		var que = 'comment=' + text;
		que += '&type=' + types;
		que += '&media_id=' + mid;
		http.send(que);
		http.onreadystatechange=function() 
		{
			document.getElementById("ctext").disabled=true;
			document.getElementById("cbutton").disabled=true;
			document.getElementById("respCom").style.display = "block";
			document.getElementById("respCom2").innerHTML = document.getElementById("respCom2").innerHTML = "";
			document.getElementById("respCom2").innerHTML = document.getElementById("respCom2").innerHTML = text;
		}
		http.send(null);							
	}	

}

//Send Comment
function sendCommComment(type,cid,dvid)
{
	var text = document.getElementById('cm-'+cid).value;				
	if (http.readyState == 4 || http.readyState == 0) 
	{
		http.open("POST", siteurl + "/_ajax/send_comment.php", true);
		http.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		var que = 'comment=' + text;
		que += '&comment_type=' + type;
		que += '&type=comment';
		que += '&comment_id=' + cid;
		http.send(que);
		http.onreadystatechange=function() 
		{
			document.getElementById("replytext").style.display = "none";
			var d = '<div style="clear:both; display:block; width:92%; border-top:1px dotted #ccccdd; background:#E8E8E8; border-left:1px dotted #ccccdd; padding:2px 2px 5px 2px; margin-left:30px;"><span class="s10"><a href="' + siteurl + '/' + s_username + '">' + s_username + '</a></span>><br /><span class="s9a">' + text + '</span></div>';	
			document.getElementById(dvid).innerHTML = d;
		}
		http.send(null);							
	}	

}


// LOGIN SECTION
var doc = document;
var err1 = '<span class="texterror">';
var err2 = '</span>';
function checkfield1(id) {
	doc.getElementById('error').innerHTML = '';
	if (doc.getElementById(id).value == '') {
		doc.getElementById('error').innerHTML = err1 + 'Email is not a valid email' + err2;		
		doc.getElementById('error').style.display = 'block';
	}
}

var http = false;
if(navigator.appName == "Microsoft Internet Explorer") 
{
  http = new ActiveXObject("Microsoft.XMLHTTP");
} 
else 
{
  http = new XMLHttpRequest();
}

function process()
{	
	var page = "";
	if (document.getElementById('returnpage').value != "") 
	{
		page = document.getElementById('returnpage').value;
	}
	parent.document.location =  siteurl + "/" + page;				
	//document.location =  siteurl + '/register.php?step=2';		
}

function reset()
{	
	document.getElementById('login_username').value = "";
	document.getElementById('login_password').value = "";
	document.getElementById('errorlog').innerHTML = '<span class="textvalidate_no">Username or Password is Invalid.</span>'					
}

function checkfields()
{
	var error = "";
	var login_username = document.getElementById('login_username').value;
	var login_password = document.getElementById('login_password').value;
	login_password = md5(login_password);
	
	if(login_username == "")
	{
		error = "Username must not be empty.";
	}
	else if(login_password == "")
	{
		error = "Password must not be empty.";
	}
	if (error == '')
	{											
		if (http.readyState == 4 || http.readyState == 0) 
		{
			http.open("POST", 'login.php?', true);
			http.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
			var que = 'login_submit=1';
			que += '&login_username=' + login_username;
			que += '&login_password=' + login_password;
			http.send(que);
			http.onreadystatechange=function() 
			{
				if(http.readyState == 4) {
		  			document.getElementById('errorlog').innerHTML = http.responseText;
		  			if (document.getElementById('errorlog').innerHTML == "")
		  			{
		  				process();
		  			}
		  			else
		  			{
		  				reset();
		  			}
				}
			}							
		}			
	}
	else
	{
		document.getElementById('errorlog').innerHTML = '<span class="textvalidate_no">' + error + '</span>'
	}		
			
}

















// Ajax Paging -Change Page
function getPage(link,query)
{
	var page = document.getElementById("pager").value;				
	if (http.readyState == 4 || http.readyState == 0) 
	{
		http.open("POST", link, true);
		http.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		var que = 'getpage=' + page;
		que += '&query=' + query;
		http.send(que);
		http.onreadystatechange=function() 
		{
			document.getElementById("ajaxContent").innerHTML = "";
			document.getElementById("ajaxContent").innerHTML = http.responseText;
		}
		http.send(null);							
	}	

}	


// -----------------------------------------//


//STLES SECTION
function showup(id1,id2,id3,id4) {
	document.getElementById(id4).style.display = "none";
	document.getElementById(id3).style.display = "none";		
	document.getElementById(id2).style.display = "none";		
	document.getElementById(id1).style.display = "block";		
}

function onHover(img) {
	document.getElementById(img).style.border = "solid 1px #7C2460";		
}
function offHover(img) {
	document.getElementById(img).style.border = "solid 1px #DD1996";			
}

// Right Side Nav
function rhover(div,sp,a) {
	document.getElementById(div).style.border = "solid 1px #999999";
	document.getElementById(div).style.backgroundColor = "D3CBB5";
	document.getElementById(sp).style.fontWeight = "800";
}

function rdehover(div,sp,a) {
	document.getElementById(div).style.border = "solid 1px #C4D2C6";
	document.getElementById(div).style.backgroundColor = "";
	document.getElementById(sp).style.fontWeight = "400";
}



function unavHoverOn(div) {	

	var doc1 = document.getElementById('u_video').style;
	var doc2 = document.getElementById('u_photo').style;
	var doc3 = document.getElementById('u_audio').style;
	var doc4 = document.getElementById('u_url').style;

	if (div == 'u_video') {
		
		doc1.backgroundColor = "4171AD";
		doc2.backgroundColor = "6E96C8";
		doc3.backgroundColor = "6E96C8";
		doc4.backgroundColor = "827DA1";
		document.getElementById('ubar').style.backgroundColor = "4171AD";

		doc1.borderBottom = "solid 2px #4171AD";
		doc1.borderLeft 	= "solid 1px #DDDDFF";
		doc1.borderRight 	= "solid 1px #DDDDFF";
						
		doc2.borderBottom = "solid 2px #DDDDFF";
		doc2.borderLeft 	= "solid 1px #DDDDFF";
		doc2.borderRight 	= "solid 1px #DDDDFF";

		doc3.borderBottom = "solid 2px #DDDDFF";
		doc3.borderLeft 	= "solid 1px #DDDDFF";
		doc3.borderRight 	= "solid 1px #DDDDFF";
		
		doc4.borderBottom = "solid 2px #DDDDFF";
		doc4.borderLeft 	= "solid 1px #DDDDFF";
		doc4.borderRight 	= "solid 1px #DDDDFF";		

	}
	else if (div == 'u_photo') {
		
		doc1.backgroundColor = "6E96C8";
		doc2.backgroundColor = "4171AD";
		doc3.backgroundColor = "6E96C8";
		doc4.backgroundColor = "827DA1";
		document.getElementById('ubar').style.backgroundColor = "4171AD";

		doc1.borderBottom = "solid 2px #DDDDFF";
		doc1.borderLeft 	= "solid 1px #DDDDFF";
		doc1.borderRight 	= "solid 1px #DDDDFF";
						
		doc2.borderBottom = "solid 2px #4171AD";
		doc2.borderLeft 	= "solid 1px #DDDDFF";
		doc2.borderRight 	= "solid 1px #DDDDFF";

		doc3.borderBottom = "solid 2px #DDDDFF";
		doc3.borderLeft 	= "solid 1px #DDDDFF";
		doc3.borderRight 	= "solid 1px #DDDDFF";

		doc4.borderBottom = "solid 2px #DDDDFF";
		doc4.borderLeft 	= "solid 1px #DDDDFF";
		doc4.borderRight 	= "solid 1px #DDDDFF";
	}
	else if (div == 'u_audio') {
		
		doc1.backgroundColor = "6E96C8";
		doc2.backgroundColor = "6E96C8";
		doc3.backgroundColor = "4171AD";
		doc4.backgroundColor = "827DA1";
		document.getElementById('ubar').style.backgroundColor = "4171AD";

		doc1.borderBottom = "solid 2px #DDDDFF";
		doc1.borderLeft 	= "solid 1px #DDDDFF";
		doc1.borderRight 	= "solid 1px #DDDDFF";
						
		doc2.borderBottom = "solid 2px #DDDDFF";
		doc2.borderLeft 	= "solid 1px #DDDDFF";
		doc2.borderRight 	= "solid 1px #DDDDFF";

		doc3.borderBottom = "solid 2px #4171AD";
		doc3.borderLeft 	= "solid 1px #DDDDFF";
		doc3.borderRight 	= "solid 1px #DDDDFF";
		
		doc4.borderBottom = "solid 2px #DDDDFF";
		doc4.borderLeft 	= "solid 1px #DDDDFF";
		doc4.borderRight 	= "solid 1px #DDDDFF";
	}
	else if (div == 'u_url') {
		
		doc1.backgroundColor = "6E96C8";
		doc2.backgroundColor = "6E96C8";
		doc3.backgroundColor = "6E96C8";
		doc4.backgroundColor = "635E80";
		document.getElementById('ubar').style.backgroundColor = "635E80";

		doc1.borderBottom = "solid 2px #DDDDFF";
		doc1.borderLeft 	= "solid 1px #DDDDFF";
		doc1.borderRight 	= "solid 1px #DDDDFF";
						
		doc2.borderBottom = "solid 2px #DDDDFF";
		doc2.borderLeft 	= "solid 1px #DDDDFF";
		doc2.borderRight 	= "solid 1px #DDDDFF";

		doc3.borderBottom = "solid 2px #DDDDFF";
		doc3.borderLeft 	= "solid 1px #DDDDFF";
		doc3.borderRight 	= "solid 1px #DDDDFF";

		doc4.borderBottom = "solid 2px #635E80";
		doc4.borderLeft 	= "solid 1px #DDDDFF";
		doc4.borderRight 	= "solid 1px #DDDDFF";
	}	
		

}

function unavHoverOff(div) {	
	var modify = document.getElementById(div).value;
	var doc1 = document.getElementById('u_video').style;
	var doc2 = document.getElementById('u_photo').style;
	var doc3 = document.getElementById('u_audio').style;
	var doc4 = document.getElementById('u_url').style;
	
	if (modify == "u_video") {
	
		
		doc1.backgroundColor = "4171AD";
		doc2.backgroundColor = "6E96C8";
		doc3.backgroundColor = "6E96C8";
		doc4.backgroundColor = "827DA1";
		document.getElementById('ubar').style.backgroundColor = "4171AD";
		
		doc1.borderBottom = "solid 2px #4171AD";
		doc1.borderLeft 	= "solid 1px #DDDDFF";
		doc1.borderRight 	= "solid 1px #DDDDFF";			
		doc2.borderBottom = "solid 2px #DDDDFF";
		doc2.borderLeft 	= "solid 1px #DDDDFF";
		doc2.borderRight 	= "solid 1px #DDDDFF";
		doc3.borderBottom = "solid 2px #DDDDFF";
		doc3.borderLeft 	= "solid 1px #DDDDFF";
		doc3.borderRight 	= "solid 1px #DDDDFF";
		doc4.borderBottom = "solid 2px #DDDDFF";
		doc4.borderLeft 	= "solid 1px #DDDDFF";
		doc4.borderRight 	= "solid 1px #DDDDFF";
	}
	else if (modify == "u_photo") {
		
		doc1.backgroundColor = "6E96C8";
		doc2.backgroundColor = "4171AD";
		doc3.backgroundColor = "6E96C8";
		doc4.backgroundColor = "827DA1";
		document.getElementById('ubar').style.backgroundColor = "4171AD";
		
		doc1.borderBottom = "solid 2px #DDDDFF";
		doc1.borderLeft 	= "solid 1px #DDDDFF";
		doc1.borderRight 	= "solid 1px #DDDDFF";			
		doc2.borderBottom = "solid 2px #4171AD";
		doc2.borderLeft 	= "solid 1px #DDDDFF";
		doc2.borderRight 	= "solid 1px #DDDDFF";
		doc3.borderBottom = "solid 2px #DDDDFF";
		doc3.borderLeft 	= "solid 1px #DDDDFF";
		doc3.borderRight 	= "solid 1px #DDDDFF";
		doc4.borderBottom = "solid 2px #DDDDFF";
		doc4.borderLeft 	= "solid 1px #DDDDFF";
		doc4.borderRight 	= "solid 1px #DDDDFF";
	}
	else if (modify == "u_audio") {
		
		doc1.backgroundColor = "6E96C8";
		doc2.backgroundColor = "6E96C8";
		doc3.backgroundColor = "4171AD";
		doc4.backgroundColor = "827DA1";
		document.getElementById('ubar').style.backgroundColor = "4171AD";
		
		doc1.borderBottom = "solid 2px #DDDDFF";
		doc1.borderLeft 	= "solid 1px #DDDDFF";
		doc1.borderRight 	= "solid 1px #DDDDFF";				
		doc2.borderBottom = "solid 2px #DDDDFF";
		doc2.borderLeft 	= "solid 1px #DDDDFF";
		doc2.borderRight 	= "solid 1px #DDDDFF";
		doc3.borderBottom = "solid 2px #4171AD";
		doc3.borderLeft 	= "solid 1px #DDDDFF";
		doc3.borderRight 	= "solid 1px #DDDDFF";
		doc4.borderBottom = "solid 2px #DDDDFF";
		doc4.borderLeft 	= "solid 1px #DDDDFF";
		doc4.borderRight 	= "solid 1px #DDDDFF";
	}
	else if (modify == "u_url") {
		
		doc1.backgroundColor = "6E96C8";
		doc2.backgroundColor = "6E96C8";
		doc3.backgroundColor = "6E96C8";
		doc4.backgroundColor = "635E80";
		document.getElementById('ubar').style.backgroundColor = "635E80";
		
		doc1.borderBottom = "solid 2px #DDDDFF";
		doc1.borderLeft 	= "solid 1px #DDDDFF";
		doc1.borderRight 	= "solid 1px #DDDDFF";				
		doc2.borderBottom = "solid 2px #DDDDFF";
		doc2.borderLeft 	= "solid 1px #DDDDFF";
		doc2.borderRight 	= "solid 1px #DDDDFF";
		doc3.borderBottom = "solid 2px #DDDDFF";
		doc3.borderLeft 	= "solid 1px #DDDDFF";
		doc3.borderRight 	= "solid 1px #DDDDFF";
		doc4.borderBottom = "solid 2px #635E80";
		doc4.borderLeft 	= "solid 1px #DDDDFF";
		doc4.borderRight 	= "solid 1px #DDDDFF";
		
	}
}

function unavClick(div) {	
	var modify = document.getElementById('modify');
	var m =  div;
	modify.value="";
	modify.value=m;
}



// MediaBar
function pnavHoverOn(div) {	

	var doc1 = document.getElementById('latest').style;
	var doc2 = document.getElementById('featured').style;
	var doc3 = document.getElementById('popular').style;
	var doc4 = document.getElementById('rated').style;
	var doc5 = document.getElementById('random').style;
		
	doc2.backgroundColor = "6E96C8";
	doc1.backgroundColor = "6E96C8";
	doc3.backgroundColor = "6E96C8";
	doc4.backgroundColor = "6E96C8";
	doc5.backgroundColor = "6E96C8";
			
	doc1.borderBottom = "solid 2px #DDDDFF";
	doc1.borderLeft 	= "solid 1px #DDDDFF";
	doc1.borderRight 	= "solid 1px #DDDDFF";
	
	doc2.borderBottom = "solid 2px #DDDDFF";
	doc2.borderLeft 	= "solid 1px #DDDDFF";
	doc2.borderRight 	= "solid 1px #DDDDFF";		
	
	doc3.borderBottom = "solid 2px #DDDDFF";
	doc3.borderLeft 	= "solid 1px #DDDDFF";
	doc3.borderRight 	= "solid 1px #DDDDFF";		
	
	doc4.borderBottom = "solid 2px #DDDDFF";
	doc4.borderLeft 	= "solid 1px #DDDDFF";
	doc4.borderRight 	= "solid 1px #DDDDFF";				

	doc5.borderBottom = "solid 2px #DDDDFF";
	doc5.borderLeft 	= "solid 1px #DDDDFF";
	doc5.borderRight 	= "solid 1px #DDDDFF";
							
	var doc = document.getElementById(div).style;
	doc.backgroundColor = "4171AD";	
	doc.borderBottom = "solid 2px #4171AD";
	doc.borderLeft 	= "solid 1px #DDDDFF";
	doc.borderRight 	= "solid 1px #DDDDFF";
		
}

function pnavHoverOff(que) {

	var doc1 = document.getElementById('latest').style;
	var doc2 = document.getElementById('featured').style;
	var doc3 = document.getElementById('popular').style;
	var doc4 = document.getElementById('rated').style;
	var doc5 = document.getElementById('random').style;
		
	doc1.backgroundColor = "6E96C8";
	doc2.backgroundColor = "6E96C8";
	doc3.backgroundColor = "6E96C8";
	doc4.backgroundColor = "6E96C8";
	doc5.backgroundColor = "6E96C8";

	doc1.borderBottom = "solid 2px #DDDDFF";
	doc1.borderLeft 	= "solid 1px #DDDDFF";
	doc1.borderRight 	= "solid 1px #DDDDFF";

	doc2.borderBottom = "solid 2px #DDDDFF";
	doc2.borderLeft 	= "solid 1px #DDDDFF";
	doc2.borderRight 	= "solid 1px #DDDDFF";

	doc3.borderBottom = "solid 2px #DDDDFF";
	doc3.borderLeft 	= "solid 1px #DDDDFF";
	doc3.borderRight 	= "solid 1px #DDDDFF";				

	doc4.borderBottom = "solid 2px #DDDDFF";
	doc4.borderLeft 	= "solid 1px #DDDDFF";
	doc4.borderRight 	= "solid 1px #DDDDFF";	

	doc5.borderBottom = "solid 2px #DDDDFF";
	doc5.borderLeft 	= "solid 1px #DDDDFF";
	doc5.borderRight 	= "solid 1px #DDDDFF";
		
	
	var doc = document.getElementById(que).style;
	doc.backgroundColor = "4171AD";	
	doc.borderBottom = "solid 2px #4171AD";
	doc.borderLeft 	= "solid 1px #DDDDFF";
	doc.borderRight 	= "solid 1px #DDDDFF";			
	
}











// User Page Nav
function mnavHoverOn(div) {	

	var doc1 = document.getElementById('latest').style;
	var doc2 = document.getElementById('avatar').style;
	var doc3 = document.getElementById('online').style;
	var doc4 = document.getElementById('random').style;
		
	doc2.backgroundColor = "6E96C8";
	doc1.backgroundColor = "6E96C8";
	doc3.backgroundColor = "6E96C8";
	doc4.backgroundColor = "6E96C8";
			
	doc1.borderBottom = "solid 2px #DDDDFF";
	doc1.borderLeft 	= "solid 1px #DDDDFF";
	doc1.borderRight 	= "solid 1px #DDDDFF";
	
	doc2.borderBottom = "solid 2px #DDDDFF";
	doc2.borderLeft 	= "solid 1px #DDDDFF";
	doc2.borderRight 	= "solid 1px #DDDDFF";		
	
	doc3.borderBottom = "solid 2px #DDDDFF";
	doc3.borderLeft 	= "solid 1px #DDDDFF";
	doc3.borderRight 	= "solid 1px #DDDDFF";		
	
	doc4.borderBottom = "solid 2px #DDDDFF";
	doc4.borderLeft 	= "solid 1px #DDDDFF";
	doc4.borderRight 	= "solid 1px #DDDDFF";				
							
	var doc = document.getElementById(div).style;
	doc.backgroundColor = "4171AD";	
	doc.borderBottom = "solid 2px #4171AD";
	doc.borderLeft 	= "solid 1px #DDDDFF";
	doc.borderRight 	= "solid 1px #DDDDFF";
		
}

function mnavHoverOff(que) {

	var doc1 = document.getElementById('latest').style;
	var doc2 = document.getElementById('avatar').style;
	var doc3 = document.getElementById('online').style;
	var doc4 = document.getElementById('random').style;
		
	doc1.backgroundColor = "6E96C8";
	doc2.backgroundColor = "6E96C8";
	doc3.backgroundColor = "6E96C8";
	doc4.backgroundColor = "6E96C8";

	doc1.borderBottom = "solid 2px #DDDDFF";
	doc1.borderLeft 	= "solid 1px #DDDDFF";
	doc1.borderRight 	= "solid 1px #DDDDFF";

	doc2.borderBottom = "solid 2px #DDDDFF";
	doc2.borderLeft 	= "solid 1px #DDDDFF";
	doc2.borderRight 	= "solid 1px #DDDDFF";

	doc3.borderBottom = "solid 2px #DDDDFF";
	doc3.borderLeft 	= "solid 1px #DDDDFF";
	doc3.borderRight 	= "solid 1px #DDDDFF";				

	doc4.borderBottom = "solid 2px #DDDDFF";
	doc4.borderLeft 	= "solid 1px #DDDDFF";
	doc4.borderRight 	= "solid 1px #DDDDFF";	

	
	var doc = document.getElementById(que).style;
	doc.backgroundColor = "4171AD";	
	doc.borderBottom = "solid 2px #4171AD";
	doc.borderLeft 	= "solid 1px #DDDDFF";
	doc.borderRight 	= "solid 1px #DDDDFF";			
	
}















// Search Nav
function pnavHoverOn2(div) {	

	var doc2 = document.getElementById('s_articles').style;
	var doc3 = document.getElementById('s_videos').style;
	var doc4 = document.getElementById('s_photos').style;
	var doc5 = document.getElementById('s_audios').style;
	var doc6 = document.getElementById('s_members').style;

	doc2.backgroundColor = "6E96C8";
	doc3.backgroundColor = "6E96C8";
	doc4.backgroundColor = "6E96C8";
	doc5.backgroundColor = "6E96C8";
	doc6.backgroundColor = "6E96C8";

	doc2.borderBottom = "solid 2px #DDDDFF";
	doc2.borderLeft 	= "solid 1px #DDDDFF";
	doc2.borderRight 	= "solid 1px #DDDDFF";

	doc3.borderBottom = "solid 2px #DDDDFF";
	doc3.borderLeft 	= "solid 1px #DDDDFF";
	doc3.borderRight 	= "solid 1px #DDDDFF";
	
	doc4.borderBottom = "solid 2px #DDDDFF";
	doc4.borderLeft 	= "solid 1px #DDDDFF";
	doc4.borderRight 	= "solid 1px #DDDDFF";				

	doc5.borderBottom = "solid 2px #DDDDFF";
	doc5.borderLeft 	= "solid 1px #DDDDFF";
	doc5.borderRight 	= "solid 1px #DDDDFF";

	doc6.borderBottom = "solid 2px #DDDDFF";
	doc6.borderLeft 	= "solid 1px #DDDDFF";
	doc6.borderRight 	= "solid 1px #DDDDFF";							


	var doc = document.getElementById(div).style;
	doc.backgroundColor = "4171AD";	
	doc.borderBottom = "solid 2px #4171AD";
	doc.borderLeft 	= "solid 1px #DDDDFF";
	doc.borderRight 	= "solid 1px #DDDDFF";		
	
}

function pnavHoverOff2(div) {

	var doc2 = document.getElementById('s_articles').style;
	var doc3 = document.getElementById('s_videos').style;
	var doc4 = document.getElementById('s_photos').style;
	var doc5 = document.getElementById('s_audios').style;
	var doc6 = document.getElementById('s_members').style;
	

	doc2.backgroundColor = "6E96C8";
	doc3.backgroundColor = "6E96C8";
	doc4.backgroundColor = "6E96C8";
	doc5.backgroundColor = "6E96C8";
	doc6.backgroundColor = "6E96C8";

					
	doc2.borderBottom = "solid 2px #DDDDFF";
	doc2.borderLeft 	= "solid 1px #DDDDFF";
	doc2.borderRight 	= "solid 1px #DDDDFF";

	doc3.borderBottom = "solid 2px #DDDDFF";
	doc3.borderLeft 	= "solid 1px #DDDDFF";
	doc3.borderRight 	= "solid 1px #DDDDFF";
	
	doc4.borderBottom = "solid 2px #DDDDFF";
	doc4.borderLeft 	= "solid 1px #DDDDFF";
	doc4.borderRight 	= "solid 1px #DDDDFF";				

	doc5.borderBottom = "solid 2px #DDDDFF";
	doc5.borderLeft 	= "solid 1px #DDDDFF";
	doc5.borderRight 	= "solid 1px #DDDDFF";
							
	doc6.borderBottom = "solid 2px #DDDDFF";
	doc6.borderLeft 	= "solid 1px #DDDDFF";
	doc6.borderRight 	= "solid 1px #DDDDFF";	
	
	var g;
	var ff = document.getElementById('stype').value;
	if (ff == 'article') {g="s_articles";}
	if (ff == 'video') {g="s_videos";}
	if (ff == 'photo') {g="s_photos";}
	if (ff == 'audio') {g="s_audios";}
	if (ff == 'member') {g="s_members";}
	var doc = document.getElementById(g).style;
	doc.backgroundColor = "4171AD";	
	doc.borderBottom = "solid 2px #4171AD";
	doc.borderLeft 	= "solid 1px #DDDDFF";
	doc.borderRight 	= "solid 1px #DDDDFF";		
}










//OTHER -- Random JAVASCRIPT

// Get Media Content
function getContent(url)
{
	document.location = url;
}

// Show search from within other pages
function showSearch(dv)
{
	var doc = document.getElementById(dv).style.display
	if (doc == 'block') {document.getElementById(dv).style.display = "none";}
	if (doc == 'none') {document.getElementById(dv).style.display = "block";}

}


function siteSearch()
{
	var link = "http://www.ohioshaman.com";
	var tag = document.getElementById('search').value;
	var stype = document.getElementById('searchtype').value;			
	if (http.readyState == 4 || http.readyState == 0) 
	document.location = link + "/search/" + stype + "/" + tag;	
}	


// Open Advanced Searcht
function openSearch()
{
	var doc = document.getElementById('advSettings').style;
	if(doc.display == "block") {doc == "none"};
	if(doc.display == "none") {doc == "block"};
}
function showEmbed()
{
	document.getElementById('embedc').style = "block";
}





// Ratings and View Page Section
var timer;

function download(url){
	window.self.location.href = url;
}




function ajaxRequest(link,query)
{
				
	if (http.readyState == 4 || http.readyState == 0) 
	{
		http.open("POST", link + "?", true);
		http.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		var que = query;
		
		http.send(que);
		http.onreadystatechange=function() 
		{
			document.getElementById('showstars').style.display = 'none'; 
			document.getElementById("showvote").style.display = "block";
			document.getElementById("showvote").innerHTML = http.responseText;
		}
		http.send(null);							
	}	

}
 
function returnstars() { 
	//document.getElementById('showvote').style.display = 'none'; 
	//document.getElementById('showstars').style.display = 'block'; 		
}

function shover(num) { 
	if (num == 1) {	
		document.getElementById('star1').src = burl + '/star.gif'; 
	}
	if (num == 2) {
		document.getElementById('star1').src = burl + '/star.gif'; 
		document.getElementById('star2').src = burl + '/star.gif'; 
	}
	if (num == 3) {
		document.getElementById('star1').src = burl + '/star.gif'; 
		document.getElementById('star2').src = burl + '/star.gif'; 
		document.getElementById('star3').src = burl + '/star.gif'; 
	}
	if (num == 4) {
		document.getElementById('star1').src = burl + '/star.gif';
		document.getElementById('star2').src = burl + '/star.gif'; 
		document.getElementById('star3').src = burl + '/star.gif'; 
		document.getElementById('star4').src = burl + '/star.gif';  
	}
	if (num == 5) {
		document.getElementById('star1').src = burl + '/star.gif'; 
		document.getElementById('star2').src = burl + '/star.gif'; 
		document.getElementById('star3').src = burl + '/star.gif'; 
		document.getElementById('star4').src = burl + '/star.gif'; 
		document.getElementById('star5').src = burl + '/star.gif'; 
	}
}
function sdehover(num) { 
	if (num == 1) {
		document.getElementById('star1').src = burl + '/blank_star.gif'; 
	}
	if (num == 2) {
		document.getElementById('star1').src = burl + '/blank_star.gif'; 
		document.getElementById('star2').src = burl + '/blank_star.gif'; 
	}
	if (num == 3) {
		document.getElementById('star1').src = burl + '/blank_star.gif'; 
		document.getElementById('star2').src = burl + '/blank_star.gif'; 
		document.getElementById('star3').src = burl + '/blank_star.gif'; 
	}
	if (num == 4) {
		document.getElementById('star1').src = burl + '/blank_star.gif';
		document.getElementById('star2').src = burl + '/blank_star.gif'; 
		document.getElementById('star3').src = burl + '/blank_star.gif'; 
		document.getElementById('star4').src = burl + '/blank_star.gif';  
	}
	if (num == 5) {
		document.getElementById('star1').src = burl + '/blank_star.gif'; 
		document.getElementById('star2').src = burl + '/blank_star.gif'; 
		document.getElementById('star3').src = burl + '/blank_star.gif'; 
		document.getElementById('star4').src = burl + '/blank_star.gif'; 
		document.getElementById('star5').src = burl + '/blank_star.gif'; 
	}
}


function zclose(dvid) 
{
	document.getElementById('COMM-'+dvid).innerHTML = "";
	//document.getElementById(dvid).style.display = "none";
}

function replyto(cmid,dvid) 
{
	var doc1 = document.getElementById(dvid);
	var ctype = document.getElementById('cType').value;
	doc1.innerHTML = '<div style="clear:both; margin-left:30px;"><textarea id="cm-' + cmid + '" name="commenttext" style="width:410px; height:60px;"></textarea><br /><input type="submit" id="cbutton" value="Submit Comment" onclick=\'javascript:sendCommComment("' + ctype + '","' + cmid + '","' + dvid + '");\'><input type="submit" id="clbutton" value="Close" onclick=\'javascript:zclose("' + cmid + '");\'></div>';
}


function showreply() 
{
	var doc1 = document.getElementById('all_replies').style;
	var doc2 = document.getElementById('hmsg').style;
	var doc3 = document.getElementById('smsg').style;
	doc1.display = "block";
	doc2.display = "block";
	doc3.display = "none";
}
function hidereply() 
{
	var doc1 = document.getElementById('all_replies').style;
	var doc2 = document.getElementById('hmsg').style;
	var doc3 = document.getElementById('smsg').style;
	doc1.display = "none";
	doc2.display = "none";
	doc3.display = "block";
}







function copy(text2copy) {
  if (window.clipboardData) {
    window.clipboardData.setData("Text",text2copy);
  } else {
    var flashcopier = 'flashcopier';
    if(!document.getElementById(flashcopier)) {
      var divholder = document.createElement('div');
      divholder.id = flashcopier;
      document.body.appendChild(divholder);
    }
    document.getElementById(flashcopier).innerHTML = '';
    var divinfo = '<embed src="_clipboard.swf" FlashVars="clipboard='+escape(text2copy)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
    document.getElementById(flashcopier).innerHTML = divinfo;
  }
}
