﻿<!--
//********************************************************
//	Open New Windows To Show Comments
//********************************************************
function  Showdata(id)
{
var myurl
myurl = "showdata.aspx?id=" + id
var w,h
w=screen.width/2 - 300
pr="toolbar=no,location=no,directories=no,status=no, menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=500,height=315,left=" + w +",top=0;"
win = window.open(myurl, "newWin",pr)
}

//********************************************************
//	Open New Windows To Show
//********************************************************
function  ShowLargPic(id,grp)
{
var myurl
myurl = "showpic.aspx?id=" + id + "&grp=" + grp
var w,h
w=screen.width/2 - 300
pr="toolbar=no,location=no,directories=no,status=no, menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=570,height=600,left=" + w +",top=0;"
win = window.open(myurl, "newWin",pr)
}

//********************************************************
//	Open New Windows To Show Comments
//********************************************************
function  ShowOrders(id,grp)
{
var myurl
myurl = "orders.aspx?id=" + id + "&grp=" + grp
var w,h
w=screen.width/2 - 300
pr="toolbar=no,location=no,directories=no,status=no, menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=550,height=550,left=" + w +",top=0;"
win = window.open(myurl, "newWin",pr)
}
//********************************************************
//  check is number
//********************************************************
function isNumeric (num)
{
	var Numbers = "0123456789";
	
	for (var i=0;i<num.length;i++)
	{
		ch = Numbers.indexOf(num.charAt(i))
		if (ch == -1)
			return false;
	}

	return true;
}
//********************************************************
//  Set Page Title
//********************************************************
function SetPageTitle(MyStr)
{
if (navigator.appName == "Netscape")
{
	document.pagetitle.document.write(mymsg);
	document.pagetitle.document.close();

}
else 
{
	document.all.pagetitle.innerHTML = mymsg
}

mymsg = " محصـولات  " + MyStr 
document.title += mymsg;
}
//##############################################################################################

//********************************************************
//   Disable   mouse Right click  without  any Message
//********************************************************
/*
function clickIE() {
if (document.all) {
return false;
}
} 
function clickNS(e) {
if (document.layers||(document.getElementById&&!document.all)) { 
if (e.which==2||e.which==3) {
return false;
}
}
} 
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS;
} 
else{
document.onmouseup=clickNS;
document.oncontextmenu=clickIE;
} 
document.oncontextmenu=new Function("return false") 
*/
//********************************************************
//  Add To Favorite 
//********************************************************
function addtofav(myurl,mytl)
{
if (myurl == ' ' || mytl == ' ' )
	{
window.external.addFavorite(document.location.href, document.title );
	}
else
	{
window.external.addFavorite( myurl,mytl );
	}
}
//********************************************************
//
//********************************************************
function emailCheck(emailStr) {
// checks if the e-mail address is valid
if (emailStr!=""){
var emailPat =/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
var matchArray = emailStr.match(emailPat);
if (matchArray == null) {
alert("Please,Check your email asddress.");
thisForm.Email.focus();
return false;
}
// make sure the IP address domain is valid
var IPArray = matchArray[2].match(/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/);
if (IPArray != null) {
for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {
alert("Destination IP address is invalid!")
thisForm.Email.focus();
return false;
      }
   }
}}
return true;
}
//********************************************************
//
//********************************************************
function checktel(){
if (!((window.event.keyCode>=33 && 40>=window.event.keyCode) || (window.event.keyCode>=48 && 57>=window.event.keyCode) || (window.event.keyCode>=96 && 122>=window.event.keyCode &&  window.event.keyCode!=106 && window.event.keyCode!=110 && window.event.keyCode!=111) || (window.event.keyCode==8) || (window.event.keyCode==9) || (window.event.keyCode==13) || (window.event.keyCode==27) || (window.event.keyCode==46) || (window.event.keyCode==17) || (window.event.keyCode==18) || (window.event.keyCode==20) || (window.event.keyCode==144) || (window.event.keyCode==45) || (window.event.keyCode==32))){
thisForm.Tel.value=""
alert("Illegal character")
}
}
//********************************************************
//
//********************************************************
function checkfax(){
if (!((window.event.keyCode>=33 && 40>=window.event.keyCode) || (window.event.keyCode>=48 && 57>=window.event.keyCode) || (window.event.keyCode>=96 && 122>=window.event.keyCode &&  window.event.keyCode!=106 && window.event.keyCode!=110 && window.event.keyCode!=111) || (window.event.keyCode==8) || (window.event.keyCode==9) || (window.event.keyCode==13) || (window.event.keyCode==27) || (window.event.keyCode==46) || (window.event.keyCode==17) || (window.event.keyCode==18) || (window.event.keyCode==20) || (window.event.keyCode==144) || (window.event.keyCode==45) || (window.event.keyCode==32))){
thisForm.Fax.value=""
alert("Illegal character")
}
}
//********************************************************
//  Html Preloader
//********************************************************
var DHTML = (document.getElementById || document.all || document.layers); 
function ap_getObj(name) 
{ 
if (document.getElementById) 
{ 
return document.getElementById(name).style; 
} 
else if (document.all) 
{ 
return document.all[name].style; 
} 
else if (document.layers) 
{ 
return document.layers[name]; 
}} 
function ap_showWaitMessage(div,flag) 
{ 
if (!DHTML) return; 
var x = ap_getObj(div); 
x.visibility = (flag) ? 'visible':'hidden' 
if(! document.getElementById) 
if(document.layers) 
x.left=280/2; 
return true; 
} 
//********************************************************
//  Show  Pictor Slide
//********************************************************
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 10000;
// Duration of crossfade (seconds)
var crossFadeDuration = 3;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below
Pic[0] = 'rnd/1.jpg'
Pic[1] = 'rnd/2.jpg'
Pic[2] = 'rnd/3.jpg'
Pic[3] = 'rnd/4.jpg'
Pic[4] = 'rnd/5.jpg'
Pic[5] = 'rnd/6.jpg'
Pic[6] = 'rnd/7.jpg'
Pic[7] = 'rnd/8.jpg'
Pic[8] = 'rnd/9.jpg'
Pic[9] = 'rnd/10.jpg'
Pic[10] = 'rnd/11.jpg'
Pic[11] = 'rnd/12.jpg'
Pic[12] = 'rnd/13.jpg'
Pic[13] = 'rnd/14.jpg'
Pic[14] = 'rnd/15.jpg'
Pic[15] = 'rnd/16.jpg'
Pic[16] = 'rnd/17.jpg'
Pic[17] = 'rnd/18.jpg'
Pic[18] = 'rnd/19.jpg'

// do not edit anything below this line
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}
function runSlideShow() {
if (document.all) {
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow.src = preLoad[j].src;
if (document.all) {
document.images.SlideShow.filters.blendTrans.Play();
}
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
}
//********************************************************
//    Skip  Java Script Errors
//********************************************************
function stoperror(){
return true
}



// -->