// SaibSM - Site Managment
// Copyright (c) The Saudi Investment Bank 2005
// -----------------------------------------------------------
// The version below must be updated on every change
SaibVCStore("SaibSM.0001#2 28Dec05 Site Managment");					// Version of this JS file
// -----------------------------------------------------------
// Modification Log
// 16Oct05 BD First version produced
// -----------------------------------------------------------

var __SMEngl2 =	"You are using our internal Intranet service, which does not provide all links found on our Internet service.";
var __SMEngl1 = "You cannot link to the requested target through this service.\n"+__SMEngl2;

var __SMArab2 = "أنت الان تستخدم الخدمة من خلال الشبكة الداخلية، والتي لا تدعم جميع الروابط الموجودة في خدمة الانترنت الخاصة بنا.";
var __SMArab1 = "لا تستطيع الربط مع الجهة المطلوبة من خلال هذه الخدمة.\n"+__SMArab2;


function __SMIntraBlockWindow(NetTyp, URL, Lang)	// Check If the Server is Intranet or Internet
{	
	var EnglishMessage = "You cannot access "  +URL+" through this service.\n"+__SMEngl2;
	var ArabicMessage = " لا يمكنك الدخول الى "+URL+" من خلال هذه الخدمة.\n"  +__SMArab2;

	if (NetTyp.toUpperCase() == "INTRANET")
	{
		if (Lang.toUpperCase() == "ARAB") alert(ArabicMessage);
		else {alert(EnglishMessage);}
	}
	else 	window.open(URL);
}

function __SMIntraBlockForm(NetTyp, Lang)	// Check If the Server is Intranet or Internet
{	
	if (NetTyp.toUpperCase() == "INTRANET")
	{
		if (Lang.toUpperCase() == "ARAB") 	alert(__SMArab1);
		else 					alert(__SMEngl1);
		return false;
	}
	return true;
}

function __SMIntraBlockLocation(NetTyp,URL,Lang)	// Check If the Server is Intranet or Internet
{	
	if (NetTyp.toUpperCase() == "INTRANET")
	{
		if (Lang.toUpperCase() == "ARAB") 	alert(__SMArab1);
		else 				alert(__SMEngl1);
	}
	else 	location.href(URL);
}

function SaibSMWindow(URL, Lang) 	{ __SMIntraBlockWindow(strGlbNetTyp, URL, Lang); }
function SaibSMAdvise(Lang) 		{ __SMIntraBlockForm(strGlbNetTyp, Lang); }
function SaibSMLocation(URL, Lang) 	{ __SMIntraBlockLocation(strGlbNetTyp, URL, Lang); }
