// JavaScript Document

function dimMore(){
document.getElementById('mobile').style.backgroundColor = "#ffffff";
}

function dim(target){
//alert(target);
document.getElementById(target).style.backgroundColor = "#ff0000";
setTimeout(dimMore, 6000);
}

function popup(id){
	document.getElementById("ovalay").style.visibility = "visible";
	//document.getElementById("display").style.height = "420px";
	var docHeight = document.body.clientHeight;
	var docWidth = document.body.clientWidth;
	document.getElementById("ovalay").style.height = docHeight;
	var ajustedWidth = (docWidth/2) - 680;
	//alert(ajustedWidth);
	//document.getElementById("display").style.left  = ajustedWidth + "px";
	//document.getElementById("display").style.top  =  "10px";
	var title;
	var msg;
	switch(id){
		case 10:
		title = 'FAQ';
		msg = "<h3>What is SaveMyContacts?</h3><p>The solution is a result of extensive collaboration between seasoned application developers, business analysts and financiers within the mobile telecommunications sector.</p><p>How do I register?</p><p>You can register online using our secure merchant payment system or pay at any Zenith Bank location in the country. Registration is valid for 12 months. We will notify you at least 14-days ahead of expiration of your subscription. </p><p>How secure is my contact data?</p><p>Security is one of the most important aspect of the service. We comply fully with data protection regulations (see privacy policy). Your data is securely held on duplicated Microsoft database systems. Access is only possible through a PIN based verification process, so please make sure no one else knows your PIN. </p><p>What if I forget my PIN number?</p><p>A PIN reset will be automatically initiated after 3 unsuccessful attempts to access your on-line account. We will send you an email with your PIN. </p><p>Must I have a top end phone to use the service?</p><p>No. All users can use the service. Phone types simply determine the ease of using SaveMyContacts. With a supported handset, you can backup your contacts wirelessly. If you do not have a supported handset you can use the service online and input your contacts. When you do get a supported handset it is simple to download your contacts to your handset.</p><p>What phones are supported?</p><p>Click supported handsets link to activate the supported handset scrolling tool </p><p>What countries do you currently extend service to?</p><p>We receive payments from subscribers in Nigeria at the moment but you can back up and access from anywhere in the world as long as you have 3G service on your handset or hae online access in case you are not using wireless sync option.</p><p>How much will the service cost?</p><p>Subscription is N2,500 per annum.</p><p>What back - up options do I have?</p><p>You can back up in 2 ways: SyncML, or on-line </p><p>What is SyncML?</p><p>Once set up, syncML only requires a click of the synchronisation button on your handset to initiate a sync session. It allows your mobile phone and the SaveMyContacts application to maintain an identical contact list at all times.</p><p>Additions, edits and deletions can be done on either the website or the phone, and upon initiating a sync session both sets of data will be updated. SyncML requires access to a GPRS / 3G network OR WIFI and is charged as a data call session( we do not charge but your operator may charge for data traffic though this is usually a small amount.</p><p>SyncML is the open standard sponsored by organisations like Ericsson, IBM, Lotus, Matsushita, Motorola, Nokia, Openwave, Starfish Software and Symbian, that drives data mobility by establishing a common language for over the air communications between devices, applications and networks.</p><p>How do I use the sync function?</p><p>You will find the sync function under the organizer or tools menu of you handset. Once you have completed the registration process the function is automatically updated with your details and PIN. You simply click the icon to start synchronization.</p><p>What do you mean by online area?</p><p>SaveMyContacts provides comprehensive on-line management of contacts. Access to your online area is via input of your phone number and 4 - digit PIN. From your online area you can edit, add, delete and initiate restores of your saved contacts. </p><p>How many contacts can I back up?</p><p>Can I send email from the online personal area?</p><p>Yes, emails can be sent to any contact that is stored with an email address. We call this feature active e-mail. The sending address will be the email client on the PC you are using.</p><p>Can I back up pictures too?</p><p>Yes you can if your operator has MMS capabilities. Send pictures as picture message to mymedia@savemycontacts.com.</p><p>I want more info</p><p>ask@savemycontacts.com For support issues, email us at support@savemycontacts.com</p>";
		break;
		case 11:
		title = 'Terms of use';
		msg = "<h3>What are your terms and conditions of service?</h3><p>SaveMyContacts limited is a Nigerian registered company with registered Nos RC 5031872. Our registered office and customer support  is at Floor 02, Transcorp Hilton Abuja. </p>";
		
msg += "<p>These terms and conditions apply to the SaveMyContacts service and govern the scope of our obligations to you, the subscriber and vice versa and you acknowledge that you are over 16 years old.</p><p>By paying the appropriate subscription fee, you agree that you have read and agree with these conditions. We will notify you via email or SMS at least 14 days before the expiration of your subscription.</p><p>You acknowledge that you have read the supported phones section to identify what level of functionality your telephone handset and network currently supports.</p><p>These terms and conditions may change without notice and do not exclude your rights to legal  remedies which you are entitled to, by the operation of law. These terms and Conditions  are governed by the laws of the Federal republic of Nigeria.</p><p>Provision of this service does not imply, in any way, transfer or sharing of intellectual property rights in the service or any solution component utilised in providing this service. Accordingly, you the subscriber agree not to do any thing which infringes on our intellectual property rights.</p><p>You agree that you will not utilise this site to facilitate, in any way, commission of any act or acts which contravenes the laws of the Federal Republic of Nigeria or any territory from which you are using the SaveMyContacts service, regardless of whether you are aware of such an illegality. Such acts include, but are not limited to, obscene communications, seditious material, SMS and / or e-mail spamming, privacy infringement of any description and storage of illegal pornographic material.</p>";


msg += "<p><b>Description of Service</b></p><p>SaveMyContacts is a contact storage application which utilises SMS, syncML and on-line channels to receive and restore data you send to us. Upon registration, you will be provided with a PIN protected account area which is accessible via the internet or utilising SMS commands.</p><p><b>Privacy and security of information</b></p><p>We take Data Privacy issues very seriously. Accordingly, only authorized personnel have access to our systems.</p><p>The contacts stored in your personal contact area will be accessible to only you, the subscriber, upon verification of your identity through a PIN verification process. However,  we  are obliged to comply with law enforcement authorities if required to do so for any reason.</p><p>If three unsuccessful attempts are made your account will be locked and a new PIN sent to you via e-mail.</p><p>We undertake not to trade your information, identity or phone number to any third parties; for any purpose whatsoever, save required to do so by law.</p><p>We have taken all reasonable endeavors to ensure that the data you store with us is secure. All relevant storage systems are replicated to minimize the possibility of contact information loss. However,  If loss occurs, we cannot be liable for damages claimed as a result of loss of contacts stored with us.</p><p>Whilst we continue to ensure that all information digitally encrypted using SSL technology to guarantee privacy and security. We cannot eliminate the possibility of unauthorized access to the contents of SMS messages or other data.</p>";

msg += "<p><b>Subscriber obligations</b><p>You must keep your PIN secret. We will not be liable for any access breach or breaches that arise as a result of your deliberate or negligent disclosure to a third party.</p><p>You the subscriber agree not to store any information which is deemed illegal or immoral; or stored as part of a process aimed at the commission of any offence.</p><p>You the subscriber agree not to engage in spamming, broadcast of offensive material, or computer viruses to, or from this service.</p>";

msg += "<p><b>Limitation Of Liability</b></p><p>We can only store information which reaches our systems and like you the subscriber are dependent on operator networks to ensure that your contacts are stored. Whilst we are constantly testing the reliability of operator links and developing new relationships; we will an not be held responsible, or liable for delays or failures of the network operators, to deliver your contact information to us; or from us to you , whether via online access, SMS, or GPRS / WAP ( syncML users).</p><p>Although we endeavour to ensure continuous provision of service; we will not be responsible, or liable, for any downtime of mobile network operator/provider or of any or all components of our own service.</p><p>SaveMyContacts, its associates and privies shall not be liable for any damages, however arising for loss of use, profits, data or other intangibles, or for the cost of procurement of alternative services occasioned by our inability to provide service even if we have been advised previously of the possibility of such damages and whether such damages arise in contract, negligence, tort, under statute, in equity, at law or otherwise.</p><p>Any service advertised or displayed on our site is outside the scope of these terms and conditions. Accordingly, we are not responsible for any representations made about such services and / or products; including but not limited to warranties of satisfactory quality and fitness for purpose; or non -infringement of proprietary rights.</p>";

msg += "<p><b>Termination of service</b></p>SaveMyContacts may terminate a service agreement, where it considers that the subscriber has breached its terms and conditions of service. The organisation reserves the discretion to refund any unused credits. Your statutory rights are not affected.<p><b>Cancellation Policy</b></p>Customers have the right to cancel their subscription within 7 days, and will be entitled to a refund of their subscription, less administration charges of N500.00. Cancellation requests must be made in writing and sent to SaveMyContacts at  floor 02, Transcorp Hilton, Abuja.";
		break;
		case 12:
		title = 'Contact us';
		msg = '<table width="100%"><tr  valign="top"><td>Tel: 09 4613044, 0703 7744300.<br>support@savemycontacts.com</td><td>Address:<br>Floor 02<br>Transcorp Hilton<br>Abuja</td></tr></table><hr><br>&nbsp;<div id = "ajax_report" style="color:#009900; font-weight:bold">&nbsp;</div><table width="100%"><tr valign="top"><td>Name</td><td><input type="text" name="name" size="38" id="name" style="border:0px; border-bottom:solid 1px #ccc"></td></tr><tr><td width="100px">Phone Number</td><td><input type="text" name="phone" size="38" id="phone" style="border:0px; border-bottom:solid 1px #ccc"></td></tr><tr><td>Email</td><td><input type="text" name="email" id="email" size="38" style="border:0px; border-bottom:solid 1px #ccc"></td></tr><tr valign="top"><td>Comment</td><td><textarea name="comment" id="comment" cols="30" rows="5" ></textarea></td></tr><tr><td width="120px">Contact Preference</td><td><img src="images/icontel.gif"> <input type="checkbox" value="phone" name="contact" id="contact_phone"> <img src="images/contact.png" height="12"> <input type="checkbox" value="email" name="contact" id="contact_email"></td></tr> <tr><td>&nbsp;</td><td><input type="submit" value="Send" onclick="sendMail()"></td></tr></table>';
		break;
		case 13:
		title = 'Live chat';
		msg = 'Coming Soon';
		break;
		case 14:
		title = 'News';
		msg = 'Coming Soon';
		break;
		case 15:
		title = 'Red Card';
		msg = '<img src="images/redcard.jpg" height="100px" align="left"><p>The SaveMycontacts  "Red Card" is a loyalty initiative that enables SaveMyContacts subscribers earn a discount at leading premium and mid-level lifestyle locations.</p><p>Unlike the red card in football, the SaveMyContacts Red Card puts you into play at our partner locations. Subscribe today and get the Red card absolutely free.</p><hr><h3>Patners</h3><p>1.<strong>Polo Luxury Store</strong><br />This store is firmly established as Nigeria\'s number one in high quality brands. Polo brings together an unsurpassed range of quality products at exceptional value. Customers will find an extensive collection of diamond, gold and silver jewellery, as well as the most popular watch brands. There\'s also a large range of the top collectibles and an inspiring selection of gifts. Ground Floor, Hilton Hotel, Abuja.<br />The Palms Mall, Lekki, Lagos.<br />AIB Plaza, Adeyemo Alakija, Victoria Island, Lagos.<br /> 166 Ozumba Mbadiwe, Victoria Island, Lagos.<br />5% discount<br /></p><p>2.<strong>Odio Mimonet</strong><br />Here, glamorous suburbanites can peruse the eclectic offerings from this established fashion icon. Odio Mimonet is a leader in youthful, directional, feminine styles with a bold graphic edge.<br />Address:<br />Ground floor,<br />No. 25 Sanusi Fafunwa Street,<br />Victoria Island<br />Lagos<br />08033601177, 0807864886<br />url: www.odiomimonet.com<br />5% discount<br /></p><p>3.<strong>Sound Centre</strong><br />Leaders in delivering the latest in gadgets and sound systems of the highest quality. Located at the exclusive Palms mall and in the lobby of the Hilton Hotel, Abuja.<br />Palms, Lekki, Lagos.<br />10% discount<br /></p><p>4.<strong>Soul Lounge</strong><br />This is a sophisticated lounge ideal for a good meal and good music, located in the Lekki metropolis.<br />The palms, Lekki, Lagos.<br />5% if you spend up to N5,000 and 10% if you spend above N5,000<br /></p><p>5.<strong>Dakova Fashions</strong><br />This is a long standing name in fashion design well known for innovative designs in linen and other high quality fabrics.<br />Ceddi Plaza, Central Area, Abuja <br />10% discount<br /></p><p>6.<strong>Tucano lounge</strong><br />This lounge appeals to A-listers and pleasure seekers alike. The funky venue stands out in service delivery and entertainment.<br />26 Maitama Sule str. Asokoro, Abuja<br />10% discount<br /></p><p>7.<strong>Genevieve Clinic, LASUTH</strong><br />This clinic was borne out of the need to reduce the death rate of women in our society. The ultra modern Mammography machine here helps in the early diagnosis of breast diseases in women.<br /> 1-3 Oba Akinjobi Str. Ikeja, Lagos<br />20% discount<br /></p><p>8.<strong>Soho Lounge</strong><br />This is firmly established in the Abuja clubbing culture. Soho recognizes what clubbers really want and appeals to all individuals.<br />2022 Aminu Kano Crescent, Wuse II<br />10% discount<br /></p><p>9.<strong>Okunoren Twins</strong><br />These fashion designers have raised the bar in the fashion industry. Okunoren twins are known for their bespoke European outfits and distinctive Nigerian traditional menswear.<br />115B Eti  Osa Street, Dolphin, Ikoyi.<br />10% discount<br /></p><p>10.<strong>Tabik Couture</strong><br />These bespoke specialists transform contemporary African prints and high quality fabrics into the hottest trends, meeting well defined standards.<br />Address:<br />No. 39 Nouakchott street,<br />Zone 1,<br />Abuja<br />10% discount<br /></p><p>11.<strong>The Chancellery Hotel</strong><br />A cozy home away from home located in the heart of Abuja with every facility within a one mile radius. Perfect for both short and long stay visitors.<br />135 Ademola Adetokunbo<br />url: www.thechancellery.com <br />10% discount<br /></p><p>12.<strong>ICDL Nigeria</strong><br />This is a globally accepted, international certified computer driving license with training centres nationwide. This license is now a prerequisite for admission into the Nigerian Civil Service and is the widely recognized IT qualification across the European Union .Phase III, Ground Floor,<br />Federal Secretariat Complex, Abuja.<br />url: www.icdlnigeria.com<br />10% discount<br /></p><p>13.<strong>Aristotle Champagne Lounge</strong><br />This establishment stands for pedigree, style and class. With excellent music, there is an affluent feel to the place. Located at Ceddi Plaza in Abuja, the newly refurbished location appeals to-up-market revelers.<br />264 Tafawa Balewa Way, Ceddi Plaza, <br />Central Area, Abuja.<br />10% discount<br /></p><p>14.<strong>Cosset Cares Service</strong><br />Cosset is a care and gift delivery company primarily engaged in providing high quality gift packages to clients and their loved ones with operational locations in Lagos and Abuja. <br />For elegant, sophisticated corporate and personal gifts you can count on us.<br /> Website: www.cosset4u.com<br />Plot 12 YPO Shodeinde Street,<br />off Segun Oluwa Street Augustus Aikhomu Way, Utako District, Federal Capital Territory Abuja Nigeria <br />+234(0)9 -870-7272<br />10% discount<br /></p><p>15.<strong>Avis Nigeria</strong><br />Avis Nigeria has set out to be an innovative customer oriented company, with the sole aim of providing an esteemed car rental service for both individual and corporate bodies. <p>Our services range from short term rentals to long term lease. This is the centre of the company\'s activities in Nigeria as we take the laurel in giving our clients their much deserved satisfaction.</p><p>Avis ensures a comfortable and safe car rental practice by providing first class services to all customers alike, hence their motto "We Try Harder". Avis has a passion for excellence, knowledge and caring.</p>url: www.avisng.com<br />AVIS HOUSE<br />6 DEGEMA CLOSE<br />OFF PARK LANE<br />APAPA GRA<br />LAGOS - NIGERIA <br />Telephone: +234 1 764 6442, +234 803 718 7000, +234 803 519 9721, +234 802 356 1458<br />Email: reservations@avisng.com<br />7.5% discount<br /></p><p>16.<strong>Salamander cafe</strong><br />This cafe creates an unforgettable eating experience with an exciting array of books and CD collection in the bookshop. It offers quality meals and drinks served promptly by friendly and courteous personnel in a hygienic and refreshing environment.<br /> 72 Aminu Kano Crescent, Wuse 11, Abuja 5% discount.<br /></p><p>17.<strong>Oven Cake Craft</strong><br />This is a unique sugar craft company which specialises in making all kinds of cakes and deserts. At the Oven Cake Craft cake making is an art, customers have a wide variety to choose from and are always spoiled for choice.<br />B22-23, NSITF plaza, <br />Kashim Ibrahim Way, <br />Wuse 11 Abuja.<br /> 08033244031<br /> 5% off purchase below N10, 000<br /> 10% off purchase above N 10,000<br /></p><p>18.<strong>Rheydolence Auto Securities and Tracking</strong><br />This is an advanced vehicle tracking/security company that integrates GPS/GSM and GPS/GPRS technologies to provide online monitoring and real-time vehicle tracking services.<br />111Allen Avenue,<br />Ikeja, Lagos.<br />08052000634<br />10% discount<br /></p><p>19.<strong>Mega Juice (smoothies)</strong><br />This complete smoothie bar offers a refreshing experience with a bespoke menu of healthy fruit juices served in the most professional way, leaving you healthier and happier.<br />Farmers Market Maitama,<br />Abuja.08052082551<br />10% discount <br /></p><p>20.<strong>Kryxtal champagne Lounge</strong><br />Located in an increasingly hip end of Abuja, this is one of the best places to un-wind. This stylish bar and lounge is the ideal bar to catch up with colleagues, enjoy post dinner drinks, or celebrate special occasions.<br />70 Aminu Kano Crescent,<br />Wuse 11, Abuja.<br />09-7806980<br />10% off all wine and brandy purchases<br /></p><p>21.<strong>Thought Pyramid- Center for the Arts</strong><br />This is a cutting-edge modern and contemporary art gallery promoting emerging and well known artists of the absolute highest standard. The ultimate goals are to raise the quality of the cultural life for all Nigerians and provide a vision of a more promising future for Africans.<br />Location: No. 62 Parakou Crescent, Off Aminu Kano Crescent,<br />Wuse II, Abuja<br /></p><p>22.<strong>Selara Faces</strong><br />This is a make up, hair and nail studio that caters to sophisticated men and women, by offering high quality end products and services. The company has its own brand of makeup and skin care products, which are of international standards, called Selara Cosmetics.<br />Location: Ceddi Plaza,<br />Tafawa Balewa Way,<br />Central Business District, Abuja.<br />10% Discount <br /></p><p>23.<strong>Chrome Cars- Luxury in style</strong><br />The url for the website is www.chromecarsng.com <p>To ensure your movement around the city of Abuja is hassle free, Chrome cars will provides a chauffeur driven car hire service at your doorstep 24/7.</p>Location: Plot 92 Obafemi Awolowo way, Suite D10 Jabi Plaza<br />Jabi Business District<br />Abuja FCT<br />097831430/ 08034989268/ 08053460868<br />10% Discount<br /></p><p>24.<strong>Serenity </strong><br />Serenity offers a large selection of Health &amp; Beauty services to give you the royal treatment you deserve. Serenity group consists of a luxury spa &amp; gym, hair salon and nail bar. A team of Asian and Nigerian beauty therapists will ensure all your needs are satisfied.<br /> Location: No. 2 Sakono Crescent, opposite Ap Plaza, off Adetokunbo Ademola Crescent<br />Wuse 2, Abuja.<br />09-8701941, 234-8051050991<br />5% Discount<br /></p><p>25.<strong>Perfumery</strong><br />Perfumery guarantees genuine designer fragrances at an affordable price. Striving to be your number one choice for selection, service and satisfaction, the Perfumery is pleased to provide your personal choice of fragrance - an essential expression of your individuality.<br />Location: Ground Floor, Transcorp Hilton Hotel, Abuja.<br />08039013000<br />5% Discount<br />';
		break;
		case 16:
		title = 'Tell a Friend';
		msg = '<div id = "ajax_report" style="color:#009900; font-weight:bold">&nbsp;</div><table width="100%"><tr><td colspan="2"><b>Your Details</b></td></tr><tr><td>Your Name</td><td><input type="text" name="name"  id="name" style="border:0px; border-bottom:solid 1px #ccc"></td></tr><tr><td>Your Phone Number</td><td><input type="text" name="phone"  id="phone" style="border:0px; border-bottom:solid 1px #ccc"></td></tr><tr><td>Your Email</td><td><input type="text" name="email" id="email" style="border:0px; border-bottom:solid 1px #ccc"></td></tr><tr><td colspan="2"><b>Friend Details(1)</b></td></tr><tr><td>Friend1 Name</td><td><input type="text" name="name"  id="name1" style="border:0px; border-bottom:solid 1px #ccc"></td></tr><tr><td>Friend1 Phone Number</td><td><input type="text" name="phone"  id="phone1" style="border:0px; border-bottom:solid 1px #ccc"></td></tr><tr><td>Friend1 Email</td><td><input type="text" name="email" id="email1" style="border:0px; border-bottom:solid 1px #ccc"></td></tr><tr><td colspan="2"><b>Friend Details(2)</b></td></tr><tr><td>Friend2 Name</td><td><input type="text" name="name"  id="name2" style="border:0px; border-bottom:solid 1px #ccc"></td></tr><tr><td>Friend2 Phone Number</td><td><input type="text" name="phone"  id="phone2" style="border:0px; border-bottom:solid 1px #ccc"></td></tr><tr><td>Friend2 Email</td><td><input type="text" name="email" id="email2" style="border:0px; border-bottom:solid 1px #ccc"></td></tr><tr><td colspan="2"><b>Friend Details(3)</b></td></tr><tr><td>Friend3 Name</td><td><input type="text" name="name"  id="name3" style="border:0px; border-bottom:solid 1px #ccc"></td></tr><tr><td>Friend3 Phone Number</td><td><input type="text" name="phone"  id="phone3" style="border:0px; border-bottom:solid 1px #ccc"></td></tr><tr><td>Friend3 Email</td><td><input type="text" name="email" id="email3" style="border:0px; border-bottom:solid 1px #ccc"></td></tr><tr><td colspan="2"><b>Friend Details(4)</b></td></tr><tr><td>Friend4 Name</td><td><input type="text" name="name"  id="name4" style="border:0px; border-bottom:solid 1px #ccc"></td></tr><tr><td>Friend4 Phone Number</td><td><input type="text" name="phone"  id="phone4" style="border:0px; border-bottom:solid 1px #ccc"></td></tr><tr><td>Friend4 Email</td><td><input type="text" name="email" id="email4" style="border:0px; border-bottom:solid 1px #ccc"></td></tr><tr><td colspan="2"><b>Friend Details(5)</b></td></tr><tr><td>Friend5 Name</td><td><input type="text" name="name"  id="name5" style="border:0px; border-bottom:solid 1px #ccc"></td></tr><tr><td>Friend5 Phone Number</td><td><input type="text" name="phone"  id="phone5" style="border:0px; border-bottom:solid 1px #ccc"></td></tr><tr><td>Friend5 Email</td><td><input type="text" name="email" id="email5" style="border:0px; border-bottom:solid 1px #ccc"></td></tr><tr><td colspan="2"><div id = "ajax_report_d" style="color:#009900; font-weight:bold">&nbsp;</div></td></tr><tr valign="top"><td>Message</td><td><textarea cols="20" rows="5" name="comment" id ="comment"></textarea></td></tr><tr><td>&nbsp;</td><td><input type="submit" value="Send" onclick="tellFriend()"></td></tr></table>';
		break;
	}
	document.getElementById("o_title").innerHTML = "<table width='100%'></tr><tr><td>"+title+"</td><td align='right'><a href='javascript:cancel()' style='color:#ffffff'><img src='images/close.png'></a></td></tr></table>";
	document.getElementById("o_content").innerHTML = "<table width='100%'></tr><tr><td>"+msg+"</td></tr></table>";
}

function cancel(){
	document.getElementById("ovalay").style.visibility = "hidden";
}

var timeout    = 500;
var closetimer = 0;
var ddmenuitem = 0;

function jsddm_open()
{  jsddm_canceltimer();
   jsddm_close();
   ddmenuitem = $(this).find('ul').css('visibility', 'visible');}

function jsddm_close()
{  if(ddmenuitem) ddmenuitem.css('visibility', 'hidden');}

function jsddm_timer()
{  closetimer = window.setTimeout(jsddm_close, timeout);}

function jsddm_canceltimer()
{  if(closetimer)
   {  window.clearTimeout(closetimer);
      closetimer = null;}}

$(document).ready(function()
{  $('#jsddm > li').bind('mouseover', jsddm_open)
   $('#jsddm > li').bind('mouseout',  jsddm_timer)});

document.onclick = jsddm_close;

//ajax//
function ajax() {	
if (window.XMLHttpRequest) {		
return new XMLHttpRequest(); 	
} else if(window.ActiveXObject) {		
return new ActiveXObject("Microsoft.XMLHTTP"); 	
} else {				
alert("Your browser doesn't support the XmlHttpRequest object!");
	}
}

//Get browser specific XmlHttpRequest object.
var objReq = ajax();
//get from server
function contact() {
	if (objReq.readyState == 4 || objReq.readyState == 0) {
		
		objReq.open("GET", 'contact.php', true);
		objReq.onreadystatechange = respond; 
		objReq.send(null);
	}			
}
//send to server
var rid = 0;
function getInfo(id){
	rid = id;
	switch(id){
		case 1:
		case 2:
		case 3:
		case 4:
		case 5:
		case 6:
		document.getElementById("message").innerHTML = "<center><img src ='images/loading.gif'>Loading...</center>";
                document.getElementById("bottom_msg").innerHTML = "<center><img src ='images/loading.gif'>Loading...</center>";
		if (objReq.readyState == 4 || objReq.readyState == 0) {
		objReq.open("GET", id+'.html', true);
		objReq.onreadystatechange = doRespond; 
		objReq.send(null);
		}
		break;
		case 10:
		case 11:
		case 12:
		case 13:
		case 14:
		case 15:
		case 16:
		popup(id);
		break;
	}
}


function doRespond() {
	if (objReq.readyState == 4) {
		//alert(rid);
		/*
		var xmldoc = objReq.responseXML;
		switch(rid){
			case 1:
			var panel1 = xmldoc.getElementsByTagName("panel1");
			var panel3 = xmldoc.getElementsByTagName("panel2");
			break;
		}
		
		try{
		//alert(panel1[0].firstChild.nodeValue);
		document.getElementById('message').innerHTML = panel1[0].firstChild.nodeValue;
		document.getElementById('bottom_msg').innerHTML = panel3[0].firstChild.nodeValue;
		} catch(Exception){
			alert(Exception);
			//document.getElementById('report').innerHTML = 'Your message may have been sent but there was an error';
		}
		//document.getElementById('wait').innerHTML = '';
		*/
		document.getElementById('message').innerHTML = objReq.responseText;
		switch(rid){
			case 1:
			document.getElementById('bottom_msg').innerHTML = '<center><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="280" height="200" id="intro" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="images/intro.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="images/intro.swf" quality="high" bgcolor="#ffffff" width="280" height="200" name="intro" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></center>';
			break;
			case 2:
			getPhones();
			break;
			case 3:
			document.getElementById('bottom_msg_title').innerHTML = 'Payment Method';
                        //https://www.reloadng.com/savemycontacts/
			document.getElementById('bottom_msg').innerHTML = '<center><img src="images/payment.jpg" width="280px" /></center>';
			break;
			case 4:
			document.getElementById('bottom_msg_title').innerHTML = 'Contact Management';
			document.getElementById('bottom_msg').innerHTML = '<center><img src="images/dermoimage.jpg" width="280px" /></center>';
			break;
			case 5:
			document.getElementById('bottom_msg_title').innerHTML = 'Contact Management';
			document.getElementById('bottom_msg').innerHTML = '<center><img src="images/dermoimage.jpg" width="280px" /></center>';
			break;
			case 6:
			getPhones();
			break;
		}
	}
}

// send email
function sendMail(){
var name = document.getElementById('name').value;
var phone = document.getElementById('phone').value;
var email = document.getElementById('email').value;
var comment = document.getElementById('comment').value;

var contact_phone = document.getElementById('contact_phone').value;
var contact_email = document.getElementById('contact_email').value;
if(document.getElementById('contact_phone').checked)
var contact = 'Phone';

if(document.getElementById('contact_email').checked)
var contact = 'Email';

if (objReq.readyState == 4 || objReq.readyState == 0) {
		
		objReq.open("GET", "email.jsp?name="+name+"&phone="+phone+"&email="+email+"&comment="+comment+"&contact="+contact, true);
		objReq.onreadystatechange = respond_contact; 
		objReq.send(null);
	}	

}

function respond_contact(){
if (objReq.readyState == 4) {
//document.getElementById('ajax_report').innerHTML = objReq.responseText;
document.getElementById('ajax_report').innerHTML = 'Message has been sent';
}
}

// tell a friend email
function tellFriend(){

var name = document.getElementById('name').value;
var phone = document.getElementById('phone').value;
var email = document.getElementById('email').value;
var message = document.getElementById('comment').value;
var i = 0;
var contacts = "";
for(i = 1; i <= 5; i++){

contacts += "&name"+i+"="+document.getElementById('name'+i).value+"&phone"+i+"="+document.getElementById('phone'+i).value+"&email"+i+"="+document.getElementById('email'+i).value;
}

if (objReq.readyState == 4 || objReq.readyState == 0) {
		
		objReq.open("GET", "tell_friend.jsp?name="+name+"&phone="+phone+"&email="+email+""+contacts+"&message="+message, true);
		objReq.onreadystatechange = respond_tell_friend; 
		objReq.send(null);
	}	

}

function respond_tell_friend(){
if (objReq.readyState == 4) {
//document.getElementById('ajax_report').innerHTML = objReq.responseText;
//alert(objReq.responseText);
document.getElementById('ajax_report').innerHTML = 'Message has been sent';
document.getElementById('ajax_report_d').innerHTML = 'Message has been sent';
}
}

//function to load xml document
function loadXMLDoc(filename) {
var xmlDoc;
if (window.ActiveXObject) {
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async=false;
xmlDoc.load(filename);
  } else if(window.XMLHttpRequest) 
        { 
            var errorHappendHere = "Error handling XMLHttpRequest request"; 
            var d = new XMLHttpRequest(); 
            d.open("GET", filename, false); 
            d.send(null); 
            xmlDoc=d.responseXML;
}
// code for Mozilla, Firefox, Opera, etc.
else if (document.implementation && document.implementation.createDocument) {
xmlDoc=document.implementation.createDocument("","",null);
xmlDoc.async=false;
xmlDoc.load(filename);
  } else {
  alert('Your browser cannot handle this script');
  }
return(xmlDoc);
}

function getPhones(){
	try{
var target_phone = document.getElementById('phone').value;
	}catch(Exception){
		target_phone = 'nokia';
	}
var sony_selected = '';
if(target_phone == 'sony_ericsson'){
	sony_selected = 'selected';
}
target_phone = target_phone.toLowerCase();	
xmlDoc=loadXMLDoc(target_phone+".xml");
x=xmlDoc.getElementsByTagName("phones")[0].childNodes;
var phones = '';
try{
for (i=0;i<x.length;i++){
phones += '<div style="float:left; width:90px"><center><img border="0" src="images/phones/'+xmlDoc.getElementsByTagName("url")[i].childNodes[0].nodeValue+'" style="border:0px; height:76px"><br>'+xmlDoc.getElementsByTagName("url")[i].getAttribute("name")+'</center></div>';
}
}catch(Exception){}
	var msg = '';
	msg += '<table border="0" cellpadding="0" cellspacing="0"><tr><td width="170px"><div style="background:url(images/m.gif) no-repeat; height:28px; padding:3px; margin-top:3px"><select id = "phone" style="border:0; width:146px" onchange="getPhones()"><option value="Nokia">Nokia</option><option '+sony_selected+' value="sony_ericsson">Sony Ericsson</option></select></div></td><td width="110px"><div style="background:url(images/m.png) no-repeat; height:28px; padding:1px"><table cellpadding="0" border="0" cellspacing="0"><tr><td><input type="text" id="type" style="border:0; width:84px" /></td><td><input type="image" src="images/ok.png" onclick="searchPhones()"/></td></td></tr></table></div></td></tr></table><table width="100%"><tr><td><div id="slideshow" style="width:100%"><div id="galleryContainer" style="height:82px;	border:0px solid #CCCCCC; position:relative; overflow:hidden; padding:1px; height:114px; height/* */:/**/112px;	/* height: /**/112px;"><div id="theImages" style="position:absolute;height:200px;width:100000px">'+phones+'<div id="slideEnd" style="float:left"></div></div></div></div></td></tr></table><table width="100%"><tr><td width="10px"><div id="arrow_left"><img onMouseMove="startSlide()" onMouseOut="releaseSlide()" src="images/arrow_left.gif"></div></td><td>&nbsp;</td><td width="10px"><div id="arrow_right"><img onMouseMove="startSlide()" onMouseOut="releaseSlide()" src="images/arrow_right.gif"></div></td></tr></table>';
	document.getElementById('bottom_msg').innerHTML = msg;
	document.getElementById('bottom_msg_title').innerHTML = 'Supported Phones';
	try{window.onload = initSlideShow(document.getElementById('theImages'))}catch(Exception){};
}


function searchPhones(){
var target_phone = document.getElementById('phone').value.toLowerCase();
var target_type = document.getElementById('type').value.toUpperCase();

xmlDoc=loadXMLDoc(target_phone+".xml");
var sony_selected = '';
if(target_phone == 'sony_ericsson'){
	sony_selected = 'selected';
} 

x=xmlDoc.getElementsByTagName("phones")[0].childNodes;
var phones = '';
var result = '';
try{
for (i=0;i<x.length;i++){
	if(xmlDoc.getElementsByTagName("url")[i].getAttribute("name") == target_type){
	result = '<div style="float:left; width:80px; border:solid #ff0000"><center><img border="0" src="images/phones/'+xmlDoc.getElementsByTagName("url")[i].childNodes[0].nodeValue+'" style="border:0px; height:76px" ><br>'+xmlDoc.getElementsByTagName("url")[i].getAttribute("name")+'</center></div>';
	}else{
phones += '<div style="float:left; width:80px"><center><img border="0" src="images/phones/'+xmlDoc.getElementsByTagName("url")[i].childNodes[0].nodeValue+'" style="border:0px; height:76px"><br>'+xmlDoc.getElementsByTagName("url")[i].getAttribute("name")+'</center></div>';
	}
}
}catch(Exception){}
	var msg = '';
	msg += '<table border="0" cellpadding="0" cellspacing="0"><tr><td width="170px"><div style="background:url(images/m.gif) no-repeat; height:28px; padding:3px; margin-top:3px"><select id = "phone" style="border:0; width:146px" onchange="getPhones()"><option value="nokia">Nokia</option><option '+sony_selected+' value="sony_ericsson">Sony Ericsson</option></select></div></td><td width="110px"><div style="background:url(images/m.png) no-repeat; height:28px; padding:1px"><table cellpadding="0" border="0" cellspacing="0"><tr><td><input type="text" id="type" style="border:0; width:84px" /></td><td><input type="image" src="images/ok.png" onclick="searchPhones()"/></td></td></tr></table></div></td></tr></table><table width="100%"><tr><td><div id="slideshow" style="width:100%"><div id="galleryContainer" style="height:82px;	border:0px solid #CCCCCC; position:relative; overflow:hidden; padding:1px; height:114px; height/* */:/**/112px;	/* height: /**/112px;"><div id="theImages" style="position:absolute;height:200px;width:100000px">'+result+''+phones+'<div id="slideEnd" style="float:left"></div></div></div></div></td></tr></table><table width="100%"><tr><td width="10px"><div id="arrow_left"><img onMouseMove="startSlide()" onMouseOut="releaseSlide()" src="images/arrow_left.gif"></div></td><td>&nbsp;</td><td width="10px"><div id="arrow_right"><img onMouseMove="startSlide()" onMouseOut="releaseSlide()" src="images/arrow_right.gif"></div></td></tr></table>';
	document.getElementById('bottom_msg').innerHTML = msg;
	document.getElementById('bottom_msg_title').innerHTML = 'Supported Phones';
	try{window.onload = initSlideShow(document.getElementById('theImages'))}catch(Exception){};
}

