function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}


function checkCookie()
{
font_size=getCookie('byon_font_size');
stdSize = 3;
  //alert('Welcome again '+font_size+'!');
  
  
  if (font_size!=null && font_size!="")
  {
 		return font_size; 
  }
else
  {
  		return stdSize;
  }
}






switchFontSize=function(ckname,val){

	switch (val) {
		case 'inc':
			if (CurrentFontSize+1 < 7) {
				jQuery("#int_content").removeClass('fs'+CurrentFontSize);
				CurrentFontSize++;
				jQuery("#int_content").addClass('fs'+CurrentFontSize);
			}
		break;
		case 'dec':
			if (CurrentFontSize-1 > 0) {
				jQuery("#int_content").removeClass('fs'+CurrentFontSize);
				CurrentFontSize--;
				jQuery("#int_content").addClass('fs'+CurrentFontSize);
			}
		break;
		default:
			jQuery("#int_content").removeClass('fs'+CurrentFontSize);
			CurrentFontSize = val;
			jQuery("#int_content").addClass('fs'+CurrentFontSize);
	}
	//Cookie.set(ckname, CurrentFontSize,{duration:365});
}




// Jump Menu
function P7_JumpMenu(selObj,restore){ //v1.4 by Project Seven
 var theName="MyWindow";
 var theParams='resizable=yes, status=yes, resizable=yes, width=790, height=555, top=10, left=10';
 var theFullString = selObj.options[selObj.selectedIndex].value;
 if (restore) selObj.selectedIndex=0;
 var theLength = theFullString.length;
 var endPos = theFullString.lastIndexOf("~");
 var theUrl, theTarget, theParent;
 if (endPos > 0) {theUrl = theFullString.substring(0,endPos);}
 else {theUrl = theFullString;}
 endPos++
 if (endPos < theLength) {theTarget = theFullString.substring(endPos,theLength)}
 else {theTarget = "window:Main";}
 if (theTarget == "window:New"){window.open(theUrl,theName,theParams);}
 else if (theTarget == "window:Main") {eval("parent.location='"+theUrl+"'");}
 else {eval("parent.frames[\'"+theTarget+"\'].location='"+theUrl+"'");}
} 
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

// TRAIL.JS JavaScript
function cursor(image) {
	if (document.all) {
		trail.innerHTML="<img src='old_uploads/images/home/map/" + image + ".gif'/>"
		trail.style.visibility="visible"
	}
}
function hidecursor() {
	if (document.all) {
		trail.style.visibility="hidden"
	}
}
function position() {
	if (document.all) {
		trail.style.position="absolute"
		trail.style.left=event.clientX+25
		trail.style.top=event.clientY+document.body.scrollTop-10
	}
}

//YEAR.JS
function year() {
	var mydate=new Date();
	var year=mydate.getYear();
	if (year < 1000) {
		year+=1900;
		document.write(""+year+"");
	}
}

// SETLOGIN.JS

function setLogin(s) {
	for (var i = 0; i < document.login_form.selectlogin.length; i++) {
	   
		if (document.login_form.selectlogin.options[document.login_form.selectlogin.selectedIndex]) {
			var str = document.login_form.selectlogin.options[document.login_form.selectlogin.selectedIndex].value;
			break;
		}
	}
	var arrayOfURL = str.split(",");
	var URL1 = arrayOfURL[0];
	var URL2 = arrayOfURL[1];
	if (s == 1)
	{
		if (URL1 != "") window.location.href = URL1;
	}
	else
	{
		if (URL2 != "") window.location.href = URL2;
	}
}


// OPENWINDOW.JS
function OpenWindow(url) {
	var width = 795;
	var height = 560;
	var newWin1 
	newWin1 = window.open(url, "", "status=yes,scrollbars=yes,resizable=yes,location=yes,width=" + width + ",height=" + height + ",top=5,left=5");
}

// IEUPDATE.JS
objects = document.getElementsByTagName("object");
for (var i = 0; i < objects.length; i++) {
    objects[i].outerHTML = objects[i].outerHTML;
}
