﻿var entekhab='adsl';
function move_marq(pos){
	if(pos=='up'){
		document.getElementById('marq').direction='up';
	}else if(pos=='down'){
		document.getElementById('marq').direction='down';
	}else if(pos=='start'){
		document.getElementById('marq').start();
	}else if(pos=='stop'){
		document.getElementById('marq').stop();
	}
}

function internet_load(direct,id){
	document.getElementById('internet_btn').style.backgroundPosition=direct;
	document.getElementById('dial').style.display='none';
	document.getElementById('adsl').style.display='none';
	document.getElementById('free').style.display='none';
	document.getElementById(id).style.display='';
}

function ghore_load(direct,id){
	document.getElementById('ghore_btn').style.backgroundPosition=direct;
	document.getElementById('add_form').style.display='none';
	document.getElementById('ghorekeshi').style.display='none';
	document.getElementById(id).style.display='';
}
function show_internet_form(){
	if (document.getElementById('services').value=='adsl') {
		document.getElementById('adler').style.display='';
		document.getElementById('dialer').style.display='none';
		entekhab='adsl';
	}else{
		//document.getElementById('adler').style.display='none';
		//document.getElementById('dialer').style.display='';
		//entekhab='dialup';
		a=confirm('آيا مايل به نمايش صفحه ورود به اكانت خودهستيد؟');
		document.getElementById('services').value="adsl";
		if (a) {
			window.alert("لطفاً تنظيمات پنجره هاي پاپ آپ را غير فعال كنيد\n‍Click On POP UP Blocker And Disable It");
			openpopup();
		}
	}
}
function openpopup(){
var popurl="http://dialup.pajoohesh.net"
var wid=screen.width;
var het=screen.height;
winpops=window.open(popurl,"","width="+wid+",height="+het+",resizable,scrollbars,status,toolbar")
}

function submit_form(){
	if (entekhab=='adsl'){
		document.getElementById('adsl_form').submit();
	}else{
		//document.getElementById('dial_form').submit();
		//siqma.document.getElementById('username').value='kooshia';
	}
}
/////////////////////////////////////////////////////////////////
function noScrollIE() {

document.body.scroll = "no";

document.body.style.overflow = 'hidden';

scroll(0, 275);

}

function scrollIE() {

document.body.scroll = "yes";

document.body.style.overflow = 'scroll';

}

function noScrollNS() {

document.width = window.innerWidth;

document.height = window.innerHeight;

}

function scrollNS() {

document.width = 1000;

document.height = 1000;

}


///////////////////////////////////////////////////////////////
function LockPage() {

if (browser = "Internet Explorer") {

noScrollIE();

}

else if (browser = "Netscape Navigator") {

noScrollNS();

}

}

function UnLockPage() {

if (browser = "Internet Explorer") {

scrollIE();

}

else if (browser = "Netscape Navigator") {

scrollNS();

}

}
//////////////////////////////////////////////////////////////////



function ok_sc(type){
if(type=='ok'){
	UnLockPage();
	document.getElementById('waitDiv').style.display='none';document.getElementById('layer1').style.display='none';
}else{
	LockPage();
}
}
