function linkmoreMA(){
	if (top.mobilyLang=="ar")
		document.write("المزيد")
	else
		document.write("more")
}
function linkmore(){
	if (top.mobilyLang=="ar")
		document.write('<img src="/wps/themes/html/MobilyTheme2010/ar/images/thumbMoreArrow.gif" border="0" >')
	else
		document.write('<img src="/wps/themes/html/MobilyTheme2010/en/images/thumbMoreArrow.gif" border="0">')
}

/*
function addfav() {
	window.external.AddFavorite(location.href,document.title);
}

function printpage() {
	window.print();
}


function sendfriend() {
	MailBody_en="Dear friend, %0d%0dPlease visit mobily web site and make it your home page to be always aware of their frequent promotions and news %0dhttp://www.mobily.com.sa"
	MailTitle_en="visit mobily web site"

	document.charset="windows-1256"	

	MailBody_ar="صديقي العزيز,%0dتصفح موقع موبايلي وأجعله موقعك المفضل لتبقى على إطلاع على كل جديد لموبايلي%0dhttp://www.mobily.com.sa"
	MailTitle_ar="أطلع على جديد موبايلي"
	
	if (mobilyLang=="en")
		document.location.href="mailto:?subject="+MailTitle_en+"&body=" + MailBody_en
	else
		document.location.href="mailto:?subject="+MailTitle_ar+"&body=" + MailBody_ar
	
	document.charset="utf-8"		
}



function makehome() {
	document.body.style.behavior='url(#default#homepage)';
	document.body.setHomePage('http://www.mobily.com.sa');
}

*/

function autofitIframe(frameid)
{
	var currentfr=document.getElementById(frameid)
	currentfr.height=200
	if (currentfr.Document.body)
		{
            currentfr.height = currentfr.Document.body.scrollHeight;
			currentfr.style.visibility="visible";
		}
	else
		{   
			Id_autofitIframe = window.setTimeout("autofitIframe('"+frameid+"')",2500);
		}
}

function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}


function MoveShourtcuts(){
	return;
	
	/*if (document.getElementById("iframePortal"))
		return;
	top.document.all['ShourtcutsID'].height = 0
	document.all['ShourtcutsID'].height= document.body.scrollHeight - 104 - findPosY(top.document.all['ShourtcutsID'])
	*/
}


/*window.onload = MoveShourtcuts;*/





function inverse(colorValue)
{
	/*if(colorValue.length<6||colorValue.length>6){
	window.alert('You Must Enter a six digit color code')
	document.rin.reset();
	return false;
	}*/

	a=colorValue.slice(0,2);
	b=colorValue.slice(2,4);
	c=colorValue.slice(4,6);
	
	a1=16*giveHex(a.slice(0,1));
	a2=giveHex(a.slice(1,2));
	a=a1+a2;
	b1=16*giveHex(b.slice(0,1));
	b2=giveHex(b.slice(1,2));
	b=b1+b2;
	c1=16*giveHex(c.slice(0,1));
	c2=giveHex(c.slice(1,2));
	c=c1+c2;
	
	newColor=DecToHex(255-a)+""+DecToHex(255-b)+""+DecToHex(255-c)
	
	/*alert("You Entered "+colorValue+" and \nYour inversed Color is \n"+newColor);*/
	return newColor
}

var hexbase="0123456789ABCDEF";
function DecToHex(number) {
          return hexbase.charAt((number>> 4)& 0xf)+ hexbase.charAt(number& 0xf);
        }
function giveHex(s){
	s=s.toUpperCase();
	return parseInt(s,16);
}
/*For Company News*/

function showNewsLO(id){
	var newsLatest = id;
wps_locate_page('wps.ee.aboutEE.companyNews','')
}


