/////////////verify code/////////
function verify(){
var dis=document.getElementById("notmatched");
var code1=document.getElementById("code1");
var code2=document.getElementById("code2");
if(code1.value!=code2.value){
dis.innerHTML="غير متطابق";
code1.style.background="#FFD2E9";
return false;
}else{
dis.innerHTML="";
code1.style.background="#AEFFD7";
}
}

function dirt(X){
if (X==1){
document.getElementById("marq").direction="right";
document.getElementById("marq").start();
}
if(X==2){
document.getElementById("marq").stop();
}
if(X==3){
document.getElementById("marq").direction="left";
document.getElementById("marq").start();
}
}
/////////////////focus
function setfocus( idfocus){

for (var i=1;i<=7;i++){
var obj=document.getElementById("reg"+i);
if(obj.id==idfocus){

obj.style.background="#E9EEF3";
}else{
obj.style.background="#FFFFFF";
//document.getElementById(idfocus).className = "myC";
}
}
}
////////////////////////////////flag
function flage_show(){
var img=document.getElementById("flag");
var country=document.getElementById("country");

var currentop = country.options[country.selectedIndex];
img.src="images/flag/"+currentop.value.toLowerCase()+".gif";

}
/////////////display icon image
function icon_display(){
var iconvalue=document.getElementById("icon");
var place=document.getElementById("iconhere");
place.innerHTML="<img src='images/icon/"+iconvalue.options[iconvalue.selectedIndex].value + "' height='25'/>";
}
////////////////// open new window
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',0'
win = window.open(mypage,myname,settings)
}
////////////////// open new window
var map = null;
function MapWindow(mypage,myname,w,h,scroll){
LeftPositionmap = (screen.width) ? (screen.width-w)/2 : 0;
TopPositionmap = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPositionmap+',location=1'+',left='+LeftPositionmap+',scrollbars='+scroll+',0'
map = window.open(mypage,myname,settings)
}
//// read cookie()
function ReadCookie(cookieName) {
var theCookie=""+document.cookie;
var ind=theCookie.indexOf(cookieName);
if (ind==-1 || cookieName=="") {
return false; 
}else{
return true;
}
}

////////////////////////////////// chating message//
function highlight(box, obj)
{
var color1 = '#E3E9F1';
var color2 = '#FFFFFF';

document.getElementById(obj).style.background = (box.checked ? color1 : color2);
}
function highlight10(box, obj,div10)
{
var color1 = '#E3E9F1';


document.getElementById(obj).style.background =color1 ;
document.getElementById(div10).style.display='block';
}
function highlight11(box, obj)
{

var color2 = '#FFFFFF';

document.getElementById(obj).style.background = color2 ;
}

////////////////////////////////
function chk_unchk(theform,chkboxid){
var f=document.forms[theform];
var chk=document.getElementById(chkboxid);
if(chk.checked){
for(var i=0;i<f.elements.length;i++){
var e=f.elements[i];
if(e.type=="checkbox"){
e.checked=true;
}
}
}else{
for(var i=0;i<f.elements.length;i++){
var e=f.elements[i];
if(e.type=="checkbox"){
e.checked=false;
}
}
}
}
////////////////// togel////////////////////////////////////////////////////////
function togel(id)
{
if (document.getElementById(id).style.display== 'none')
{
document.getElementById(id).style.display="";
}
else
{
document.getElementById(id).style.display="none";
}
}
///////////////////////////////////////////////////////////////////////////////
function highlightnew(box, obj)
{
     var color1 = '#ffffbb';
     var color2 = '#FFFFFF';

     document.getElementById(obj).style.background = (box.checked ? color1 : color2);
}

