﻿// JavaScript Document
//<script language="JavaScript1.2">
function addbookmark()
{
bookmarkurl="http://www.taqqadom.com"
bookmarktitle="Taqqadom Scales Co. Ltd."
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function disabletext(e){
return false
}

function reEnable(){
return true
}

//if the browser is IE4+
document.onselectstart=new Function ("return false")

//if the browser is NS6
if (window.sidebar){
document.onmousedown=disabletext
document.onclick=reEnable
}
function SetStyleTo(id, style)
{
	id.className = style ;
}
function OpenWindow( url, title, width, height)
{
	window.open(url,"m3m" ,'status=no, menubar =no, resizable=no,height=' + height + ',width=' + width);
	//if (window.focus) {newwindow.focus()}
}
function RedirectLink(url)
{
	window.location = url;
}

/*</script>*/
function ShowMenu(id, parent , percent)
{
	if( parent != null ) {
	document.getElementById(id).style.left = document.getElementById(parent).style.left + screen.width * percent;
	}
	document.getElementById(id).style.visibility = "visible";	
	//elm.innerHTML = "<B>NAME</B>" ;

}
function HideMenu(id)
{
	document.getElementById(id).style.visibility = "hidden"
}
function SwapImage(id, path)
{
	document.getElementById(id).src = path ;
}

function scrollit(seed) 
{
	var m1 = " Welcome to ";
	var m2 = " Taqaddom Scales Co. Ltd. ";
	var m3 = " Neiroukh Brothers          ";
	var m5 = " 55 Years of Excellence ";
	var m4 = " أهلاً وسهلاً بكم في شركة التقدم - نيروخ اخوان 55 عاماً من التميز ";
	var msg=m1+m2+m3+m5+m4;
	var out = " ";
	var c = 1;

/*window.status = 'Eng. Mohammed M. Melhem [4M-World]';*/
	if (seed > 100) {
		seed--;
		cmd="scrollit("+seed+")";
		timerTwo=window.setTimeout(cmd,100);
	}
	else if (seed <= 100 && seed > 0) {
		for (c=0 ; c < seed ; c++) {
			out+=" ";
		}
		
		out+=msg;
		seed--;
		window.status=out;
		cmd="scrollit("+seed+")";
		timerTwo=window.setTimeout(cmd,100);
	}
	else if (seed <= 0) {
		if (-seed < msg.length) {
			out+=msg.substring(-seed,msg.length);
			seed--;
			window.status=out;
			cmd="scrollit("+seed+")";
			timerTwo=window.setTimeout(cmd,100);
		}
		else {
			window.status="a ";
			timerTwo=window.setTimeout("scrollit(100)",75);
		}
	}
}
