//اللهم لا علم لنا الا ما علمتنا
//  Advanced  Javascript
//		PHP0@hotmail.com And Almhajer@hotmail.com
//   Class  BK  Javascript
//
//

BK.Elements = new function() {
	return{
		ID_Element:"",
		Get:function(ID_Elem) {
			if (ID_Elem!= typeof 'object') {

				return this.ID_Element = document.getElementById(ID_Elem);

			}
			else {
				return ID_Elem;
			}
		},


		On:function(Events) {
			//alert(300);
			// this.Get(this.ID_Element);

		},

		Set_Class:function(Elm, Class) {
			//var ID_Elm=this.Get(Elm);

			this.Get(Elm).setAttribute('class', Class);
		},


		Get_Class:function(Elm, Class) {
			//var ID_Elm=this.Get(Elm);

			return this.Get(Elm).className;
		},




		// #--> Elm = ID element
		// #--> Class = stylesheet
		Add_Class:function(Elm, Class) {

			this.Get(Elm).className += ' ' + Class;
		},


		// #--> Elm = ID element
		// #--> Class = stylesheet

		Delete_Class:function(Elm, Class) {
			//var ID_Elm=this.Get(Elm);
			var Class_Elem = this.Get_Class(Elm);

			var Value_Class = "/" + Class + "/g";
			var Repl = Class_Elem.replace(eval(Value_Class), ' ');

			this.Set_Class(Elm, Repl);
			//alert(arguments[0])
			//alert(Repl)


		}

	}


}




// Class Window


BK.Window = new function() {

	return{



		//#---> Open new window

		Pop_Up:function(Url, Title) {

			var Array_Stat = ['status','height','width','resizable','scrollbars']
			var Array_Value = [1,600,600,0,1]
			var Out_Put_Stat = '';
			for (var i = 0; i < Array_Stat.length; i++) {

				if (arguments[i + 1]) {
					Out_Put_Stat += Array_Stat[i] + "=" + arguments[i] + ","
				}
				else {
					Out_Put_Stat += Array_Stat[i] + "=" + Array_Value[i] + ","
				}

			}


			//window.open(Url, Title, "status = 1, height = 600, width = 700, resizable = 0, scrollbars=1")
			window.open(Url, Title, Out_Put_Stat)

		},

		Print_Page:function() {

			window.print();
		},
		Location:function() {

			 window.location();
		}

	}


}